Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 988 Bytes

File metadata and controls

40 lines (29 loc) · 988 Bytes

Android FCM Logger

Minimal Android app that logs:

  • the FCM registration token
  • every incoming RemoteMessage
  • the full data map
  • the raw xbl field
  • parsed xbl JSON, if xbl contains JSON text

Setup

  1. Create a Firebase Android app for package com.example.fcmlogger.
  2. Extract google-services.json from apk metadata
  3. Put google-services.json at app/google-services.json.
  4. Open android-fcm-logger in Android Studio.
  5. Let Android Studio install the required SDK/Gradle components.
  6. Run on a device or emulator with Google Play services.

What It Logs

Use:

adb logcat -s FcmLogger

The app logs:

  • FCM token
  • messageId
  • from
  • data
  • notification title/body
  • xbl raw
  • xbl parsed

Important Limitation

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.