Notification.enablePush()
This API can be used to enable push notifications for the embedded mobile SDK. Once enabled, you will be notified every time a visitor initiates a chat, a trigger rule is set off and every time a visitor leaves your mobile app. It is necessary that you invoke this API right after the FCM token is refreshed.
PARAMETERS
- token: Your application's FCM token.
- isTestDevice: (True/False) If the value is set to "True" then the devices will be displayed in the SalesIQ web SDK section to send and test the push notification
Note: You can send the test notification message from Settings > Brands > (Your brand name) > Installation > Android, under Configure push notification menu, enter the message in the Test Push Notifications input field.
Syntax:
CopiedZohoSalesIQ.Notification.enablePush(String token, boolean isTestDevice);
Example:
Copiedpublic class MyInstanceIDListenerService extends FirebaseInstanceIdService
{
@Override
public void onTokenRefresh()
{
String token = FirebaseInstanceId.getInstance().getToken();
ZohoSalesIQ.Notification.enablePush(token,true);
}
}