Skip to main content

Push Notifications

The Embrace SDK is able to automatically capture Firebase push notifications received by your app.


Push Notifications Capture is disabled by default.

The only requirement is having embrace.useAsmTransformApi enabled, but it's enabled by default since 5.3.0. You can check that embrace.useAsmTransformApi=false is not in your

If you want to enable the Push Notifications feature, you can set instrumentFirebaseMessaging to true in your app/build.gradle file.

swazzler {
instrumentFirebaseMessaging = true

If you want to capture data from inside the notifications then you can set the config capture_fcm_pii_data to true in your embrace-config.json file inside sdk_config. This value is false by default.


If your configuration is correct, you don't need to do anything else, you are already capturing notifications automatically. They will appear in your dashboard within the user session timeline.

If you don't want the notifications to get captured automatically, then you can avoid the setup from the previous section and when you receive a notification in your code, make the following call manually:

val isNotification = true
val hasData = true