Minimal Android app that logs:
- the FCM registration token
- every incoming
RemoteMessage - the full
datamap - the raw
xblfield - parsed
xblJSON, ifxblcontains JSON text
- Create a Firebase Android app for package
com.example.fcmlogger. - Extract
google-services.jsonfrom apk metadata - Put
google-services.jsonatapp/google-services.json. - Open
android-fcm-loggerin Android Studio. - Let Android Studio install the required SDK/Gradle components.
- Run on a device or emulator with Google Play services.
Use:
adb logcat -s FcmLoggerThe app logs:
FCM tokenmessageIdfromdatanotification title/bodyxbl rawxbl parsed
To guarantee your code sees the full payload in FirebaseMessagingService.onMessageReceived, send data messages. Mixed notification messages can be handled by Android differently when the app is backgrounded.