【发布时间】:2018-07-01 17:48:46
【问题描述】:
为什么我在打开应用时收不到 react-native-fcm 的通知?
这是我的有效载荷
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)
我只在应用最小化或关闭时收到通知
【问题讨论】:
标签: react-native push-notification react-native-fcm