Closed Md-Mudassir closed 3 years ago
@Md-Mudassir, Can you please let us know is this always reproducible and also whether you have used the following API?
@Angu-G I followed this setup docs. & i'm calling only these 2 API's in one of my component.
ZohoSalesIQ.init("android_app_key","android_access_key"); ZohoSalesIQ.setLauncherVisibility(true);
Error in Android Emulator and i get the same error in a real device as well in debug mode. it shows for few seconds and then closes the app automatically.
Is there are any additionaly setup which i'm missing for android?
@Md-Mudassir, Can you please try the following code block as a replacement of the ZohoSalesIQ.init() API and let us know that the issue persists?
ZohoSalesIQ.initWithCallback("your appKey","your accessKey", (success) => {
if(success){
ZohoSalesIQ.setLauncherVisibility(true);
}
else{
// your code
}
});
@Angu-G tried it but callback is returning false.. success seems to be false
@Md-Mudassir Please share your screen name(portal name)
are you referring this? @Angu-G
Yes, @Md-Mudassir. Let me check and get back
@Md-Mudassir, Can you please try the following code block as a replacement of the ZohoSalesIQ.init() API and let us know that the issue persists?
ZohoSalesIQ.initWithCallback("your appKey","your accessKey", (success) => { if(success){ ZohoSalesIQ.setLauncherVisibility(true); } else{ // your code } });
Even in iOS its returning false.. where as ZohoSalesIQ.init()
works (iOS)
@Angu-G any fix for the above issue? and apart from that i have 2 questions..
ZohoSalesIQ.setLauncherVisibility(true);
right? is there a way to control it to appear only in specified component?@Md-Mudassir Thank you for your patience. We have identified the issue. Our server team is checking for the mismatch in the key. We will revert back once the fix is live.
@Angu-G any fix for the above issue? and apart from that i have 2 questions..
- The floating icon is by default set globally in almost all of the components.. ideally it should only appear in one component where I am defining
ZohoSalesIQ.setLauncherVisibility(true);
right? is there a way to control it to appear only in specified component?- How to customize the floating icon like color, position..
@Md-Mudassir Customization is not possible as of now. You can disable our default launcher and have your own custom launcher and call the openChat() to open the SDK.
@Md-Mudassir, Can you please try the following code block as a replacement of the ZohoSalesIQ.init() API and let us know that the issue persists?
ZohoSalesIQ.initWithCallback("your appKey","your accessKey", (success) => { if(success){ ZohoSalesIQ.setLauncherVisibility(true); } else{ // your code } });
Thanks for the fix @Angu-G using the above API inside
useEffect
fixed the problem & for customisation I turnedZohoSalesIQ.setLauncherVisibility(false);
to false & made use ofopenChat()
API and added my own floating icon in which i had the full control over it.
@Md-Mudassir, Thank you for your time over the screen-sharing session. SDK should always be initialized at the Application level. In React-Native case, we recommend initializing the SDK in useEffect
or componentDidMount
method.
in iOS its working fine but in android its throwing the below error on app launch.
Reason
java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.drawable.Drawable com.zoho.commons.LauncherProperties.getIcon()' on a null object reference
Stacktrace
"react-native": "^0.64.0",