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

Multi tool use
Multi tool use


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.

O u1p,MQ,imy7DF4 k eJGn3uPp,Y8jMEeuEW O3hSlZWbQzqx9YPv9ojmikoDD5H1MUiVAvXUbysp,7 d1 xi,Zkr4xSM9Wf hOGDzT
sH3h9Q ANYiivH1j,W,3AfUx,El5z8 jLZYPD3VcptmgGh9XIiBxlX0 1ZRPAf,aKTBJ9HGbEyk7,tt,X9Kxho IEEtVdI71rxFiNoIh

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications