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

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

to

 <service android:name=".service.FirebaseService">
  <intent-filter>
    <action android: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"