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

General Omosco
  • 606
  • 1
  • 10
  • 20

1 Answers1

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.

Harshit
  • 107
  • 1
  • 6