-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I know if it has been initialized? #138
Comments
I wish i can use like the |
Can you explain what you are trying to do?
--
Baptiste Jamin
… On 13 Sep 2022, at 14:38, SunSeekerX ***@***.***> wrote:
I wish i can use like the Crisp.isInitialized() to get
—
Reply to this email directly, view it on GitHub <#138 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAGTRQ3TXIKACPR2QWW3ZHLV6BYSRANCNFSM6AAAAAAQLMVMGQ>.
You are receiving this because you are subscribed to this thread.
|
Thank you for such a quick reply! The websiteID is required to start the crisp activity interface, if not I get an error |
Answer is very simple. Did you follow the docs ? Just add a Log.d after setting the website ID. If you see the log, then you settled the site ID…Sent from my iPhoneOn 13 Sep 2022, at 14:49, SunSeekerX ***@***.***> wrote:
Thank you for such a quick reply!
The websiteID is required to start the crisp activity interface, if not I get an error java.lang.AssertionError: Crisp ChatBox SDK has not been configured yet. Please make sure to call Crisp.configure(String websiteID) first!, so I want to know if I have set the websiteID.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
This error came after I entered the crisp interface, and I had no way to catch it, so I needed to do a determination of whether it was initialized before I entered the crisp interface. |
Sure, but the websiteId is passed in externally. |
My requirement is to know if I have set the websiteId before starting crisp, and I need to use if to determine this, rather than outputting a log |
Externally ?Sent from my iPhoneOn 13 Sep 2022, at 14:55, SunSeekerX ***@***.***> wrote:
Answer is very simple. Did you follow the docs ? Just add a Log.d after setting the website ID. If you see the log, then you settled the site ID…Sent from my iPhoneOn 13 Sep 2022, at 14:49, SunSeekerX @.> wrote: Thank you for such a quick reply! The websiteID is required to start the crisp activity interface, if not I get an error java.lang.AssertionError: Crisp ChatBox SDK has not been configured yet. Please make sure to call Crisp.configure(String websiteID) first!, so I want to know if I have set the websiteID. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.>
Sure, but the websiteId is passed in externally.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: ***@***.***>
|
Take look this if(Crisp.isInitialized()){
Intent crispIntent = new Intent(mUniSDKInstance.getContext(), ChatActivity.class);
mUniSDKInstance.getContext().startActivity(crispIntent);
result.put("success", true);
result.put("code", 200);
result.put("msg", "启动成功!");
} else {
return "Please set websiteId first!";
} |
Hi @SunSeekerX. As soon as the For the moment, there is no public API available to know if Crisp is initialized. |
Okay, thanks for the answer, but I still need a way to know if it's initialized or not to optimize the code logic. |
How do I know if it has been initialized?
The text was updated successfully, but these errors were encountered: