React native Airship Push Notification ignored


I got the following log by this method : 

messaging().setBackgroundMessageHandler(async (remoteMessage) => {
console.log('Message handled in the background!', remoteMessage);
log : 
Message handled in the background! {"data": {"com.urbanairship.metadata": "eyJ2ZXJzaW9uX2lkIjoxLCJ0aW1lIjoxNjM2NDcxNzk3MjgyLCJwdXNoX2lkIjoiZDczN2QxZWMtNTExNC00NWI3LThhNGYtYjI1NWNmYWZiZDcxIiwiY2FtcGFpZ25zIjp7ImNhdGVnb3JpZXMiOltdfX0=", "com.urbanairship.push.ALERT": "Congratulations! You've successfully configured Android Push.", "com.urbanairship.push.APID": "26e8cdec-3e61-437c-940d-cd9e75c3a7df", "com.urbanairship.push.CANONICAL_PUSH_ID": "d737d1ec-5114-45b7-8a4f-b255cfafbd71", "com.urbanairship.push.PUSH_ID": "e51fd020-4171-11ec-a035-02423b27e6fe"}, "from": "827761845713", "messageId": "0:1636471797306222%14a7377ff9fd7ecd", "sentTime": 1636471797292, "ttl": 2419200}
I believe the notification is received successfully but it's not displayed for some reason
** messaging is imported from @react-native-firebase/messaging
I did quick research and I found this in firebase docs : 
Data-only messages

When an incoming message is "data-only" (contains no notification option), both Android & iOS regard it as low priority and will prevent the application from waking (ignoring the message). To allow data-only messages to trigger the background handler, you must set the "priority" to "high" on Android, and enable the content-available flag on iOS. For example, if using the Node.js firebase-admin package to send a message:



The device state and message contents can also determine whether a Notification will be displayed:

  Foreground Background Quit
Notification Notification: ❌ Notification: ✅ Notification: ✅
Notification + Data Notification: ❌ Notification: ✅ Notification: ✅
Data Notification: ❌ Notification: ❌ Notification: ❌


Hope you can fix it or help me to understand what is wrong. thanks


react native - android

airship push notification (test send successfully it says when I try to send test message)

Didn't find what you were looking for?

New post


1 comment

  • Hello,


    Thanks for reaching out to Airship Support with your issue. It looks like you are utilizing the Firebase Messaging library.


    Is it possible to remove that library and try out how the Airship SDK handles its own pushes?


    Please let us know if that helps in any way.

    Comment actions Permalink

Please sign in to leave a comment.