I want to switch from gcm to fcm in an android application. Do I need to send a push notification to old users of the Android application from gcm or can I send it via the new fcm from the server?
FCM works fine, I can receive push notifications on my device through fcm, but I can not send push notifications to old GCM tokens from the FCM console.
Below is the code I added to the manifest file for fcm to work -
<uses-permission android:name="com.google.android.z.permission.RECEIVE" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <application> <service android:name=".view.activity.MyFcmListenerService"> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service> <service android:name=".view.activity.MyInstanceIDListenerService"> <intent-filter> <action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> </intent-filter> </service> </application>
android firebase firebase-cloud-messaging google-cloud-messaging
Anmol
source share