How to enable push notifications for the ASAP Android SDK?
You can configure the ASAP help widget to send notifications to end-users when an agent responds via chat.
Ensure that Push Notifications settings are configured in the ASAP help widget setup page in Zoho Desk.
To enable push notifications for Chat and Tickets, include the following code snippet after initializing the SDK:
- MyApplication.deskInstance.enablePush("fcmId");
fcmId is the client token used to register the device. You can retrieve this token using the FirebaseInstanceId.getInstance().getToken(); method.
To disable push notifications, include the following code snippet:
- MyApplication.deskInstance.disablePush("fcmId");
To configure UI and navigation for notifications, add the following code snippet to the
onReceived() method of your
NotificationReceiver class.
ZDPortalConfiguration.handleNotification(Context context, Map data, int icon);
Context is the appContext. Map refers to the notification data that is received. icon is the application icon that must appear in the notification.