react-native-fcm don't receive notification when app is opened


react-native-fcm don't receive notification when app is opened



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



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.





Is android i experienced the issue but not yet tested on ios
– wisdom
yesterday





OK then test it no ios
– Harshit
yesterday






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Rothschild family

Cinema of Italy