Hi, we just integrated the CometChat SDK on our Android app with the push notifications extensions enabled.
Everything is working great regarding the reception of notifications itself, however what’s weird is that they seem to be handled by a service other than the one we registered in AndroidManifest.xml
. We added logs and breakpoints in our service but they never appeared or are triggered. But the notifications are shown, in a somewhat generic way. We’d like to handle them ourselves to customize their appearance and actions.
Based on the documentation, it doesn’t seem like the CometChat SDK is providing a default service and the one we registered should be the one receiving the notifications. Are we missing something? Not sure if it is relevant but we’re using the token-based notifications (v2).
Edit: here’s what our service declaration looks like in the manifest:
<service
android:name=".service.NotificationsService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
We also tried to mark it as exported but it didn’t solve the issue.
Best,
Eric