Flutter IOS终止状态从Firebase推送通知获取数据
在终止状态时,我们如何获取推送通知的数据以将其保存在本地数据库中?
我们使用Firebase Admin-SDK使用发送到设备功能的发送通知
我们使用此有效负载,
const payload = {
notification: {
title: title,
body: notification.message,
sound: "default",
},
data: {
click_action: "FLUTTER_NOTIFICATION_CLICK",
title: title,
message: notification.message,
}
};
并使用消息选项发送通知
{
contentAvailable: true,
priority: 'high'
}
How we can get the data of push notification to save it in our local database using flutter iOS while in terminated state?
We are using firebase admin-sdk to send push notification using the send to device function
we are using this payload
const payload = {
notification: {
title: title,
body: notification.message,
sound: "default",
},
data: {
click_action: "FLUTTER_NOTIFICATION_CLICK",
title: title,
message: notification.message,
}
};
with message options
{
contentAvailable: true,
priority: 'high'
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论