Deepali Jadhav
Deepali Jadhav

Reputation: 600

Remote push notification heads-up not working in react native when app is in background state (Android)

I have integrated push notification using Firebase library. Below library specifications,

"@react-native-firebase/messaging": "^10.5.0",
"react-native": "0.63.4",

When app is in background state push notification is received but it's not pop up on screen. What setting i need to do to heads-up push notification when app is in background state.

Upvotes: 1

Views: 654

Answers (1)

Chandler Bing
Chandler Bing

Reputation: 343

Try using firebase console or postman to send notification, if you still face problem to get notification then your sdk is not setup correctly.for postman use this link https://fcm.googleapis.com/fcm/send and paramenters:

    {
       "to" : "your_token",
       "collapse_key" : "type_a",
       "notification" : {
        "body" : "Body of Your Notification",
        "title": "Title of Your Notification"
                    }
    }

and headers:

      Authorization:server_key
      Content-Type:application/json

Upvotes: 1

Related Questions