Skip to content Skip to sidebar Skip to footer

Migrating Gcm To Firebasecm: Onmessagereceived() Not Called In Foreground

I'm trying to migrate Android client app from Google Cloud Messaging to Firebase Cloud Messaging. I strictly followed an official tutorial, but didn't succeed - onMessageReceived()

Solution 1:

if you are using FCM then you should replace this

<serviceandroid:name=".service.GcmService"><intent-filter><actionandroid:name="com.google.firebase.MESSAGING_EVENT" /></intent-filter></service>

to

<serviceandroid:name=".service.FirebaseService"><intent-filter><actionandroid:name="com.google.firebase.MESSAGING_EVENT" /></intent-filter></service>

your service not registered properly..

Post a Comment for "Migrating Gcm To Firebasecm: Onmessagereceived() Not Called In Foreground"