Notifications when app is in background

Notifications from CometChat has an optional payload. The problem with this approach is you don’t get complete control of the notification when the app is killed or in the background. “onMessageReceived” from my FirebaseMessagingService is never called and the notifications have a default appearance on the system tray, and it is necessary to parse the intent extras on the launcher activity and do the whole process again.

Is there any way, that you can enforce “data-only” notification types so that onMessageReceived is called no matter what state the app is in?

@aditya.gokula this is urgent, can you please suggest a workaround for this asap?

@aditya.gokula do you have any updates on this? This is kinda urgent :confused:

Hello @Deepan
Apologies for the delay in response. Please allow me some time while I get this checked.
Also, I would suggest you log in to the CometChat Dashboard and connect with us via the support system available from the CometChat dashboard for quicker replies.

I will get this checked and get back to you soon.
Sincere apologies for the delay again.


1 Like

Sure, no problem, thanks @aditya.gokula

Hello @Deepan,

We have modified the payload for Android. The payload sent in the Android Notification no longer has the notification key in it. Now you can have complete control over the notifications and handle them in the onMessageReceived handler.

Also, we have launched a Token-based Push Notifications extension. You can learn more here.


Hi @Deepan,
Hope this was helpful!

Please feel free to write to us at for further technical support.
Thank you.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.