Follow the instructions below which will help us debug the issue.

  1. Check if the "Push Notifications Enabled" is YES/NO in the APP DATA section on the Freshchat web interface for a conversation started from a specific device to see if you have managed to send the push token from that device.
  2. If you've followed the steps shared in the integration guide you should see that the push notifications enabled should be marked as 'YES'. If it is 'NO', follow the instructions shared below:


For Android:

If you haven't already integrated FCM, do so by following the instructions here.


After following FCM steps for integration, follow the below two steps to connect Freshchat and FCM.


Step 1: Send Registration Token

In the app's implementation of FirebaseInstanceIdService, send the token to Freshchat as follows :

@Override

public void onTokenRefresh() {

String token = FirebaseInstanceId.getInstance().getToken();

Freshchat.getInstance(this).setPushRegistrationToken(token);

}


Step 2: Handle FCM MessageIn the app's implementation of FirebaseMessagingService, pass the RemoteMessage object to Freshchat if it is a Freshchat notification.

@Override

public void onMessageReceived(RemoteMessage remoteMessage) {

if (Freshchat.isFreshchatNotification(remoteMessage)) {

Freshchat.getInstance(this).handleFcmMessage(remoteMessage);

} else {

//Handle notifications with data payload for your app

}

}


If you've followed the above steps for Android, you should see that the PUSH NOTIFICATIONS ENABLED will have switched from NO to YES.


3. For Android: Check if you've saved the right FCM key in Freshchat Settings > Mobile SDK
Note

Key length is restricted to 160-180 characters.

4. After executing the above steps if you are not receiving notifications take the conversation ID from the URL. It would be the last 10 or more digits. Paste it at the following URL:

https://web.freshchat.com/app/api/notif_debug?convId=


Now share the screenshot of the results with us.