2

Why can't i receive notication from react-native-fcm when the app is opened?

Here is my payload

const proState={};
       proState.notiUID=recKey;
        proState.notiPayload={
          data: {
            senderKey:senderKey,
            id: senderKey+':chat',
            type: 'chat'
          },
          notification: {
            title: proState.senderSnap.fullname,
            body: proState.lastmsg,
            sound: 'default',
            id: senderKey+':chat',
            tag : senderKey+':chat',
            priority : "high",
            data: senderKey
      },
        };


  const optionss = {
    priority: "high",
    show_in_foreground: true
};

return admin.messaging()
        .sendToTopic(proState.notiUID, proState.notiPayload,optionss)

I only receives notifications when the app is minimized or closed

1 Answer 1

0

you are facing same issue in android and ios both platforms? If you are facing this issue only in ios then don't worry ios not receives notifications in foreground. Which is default behaviour of ios.

2
  • Is android i experienced the issue but not yet tested on ios Jul 6, 2018 at 9:25
  • OK then test it no ios
    – Harshit
    Jul 6, 2018 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.