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 chat 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 chat and FCM.

 

Step 1: Send Registration Token

In the app's implementation of FirebaseInstanceIdService, send the token to chat 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 chat if it is a chat notification.

@Override

public void onMessageReceived(RemoteMessage remoteMessage) {

if (Freshchat.isFreshchatNotification(remoteMessage)) {

Freshchat.getInstance(this).handleFcmMessage(context, 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 chat Admin Settings > Channels > Chat & Messaging > 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.