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