![](/img/trans.png)
[英]Why my flutter app doesn't receive notifications using Firebase Cloud Messaging when running on iOS?
[英]Is there a way to receive data notifications in flutter when the app is killed?
我正在尝试为 android 中的推送通知实现自定义 ui(标题、正文、从 url 加载的图像),
firebase_messaging dart 插件在应用程序被终止时对接收数据通知有限制。
使用数据有效负载而不是通知有效负载是在 android 中本地绘制自定义 ui 通知的选项。
当应用程序被杀死时,有没有办法在 flutter 中接收数据通知?
您可以在 headless 函数中编写后台消息处理程序,并使用 firebase 本地通知插件来显示通知
本教程绝对能帮到你
https://medium.com/@sylvainduch/firebase-messaging-catch-them-all-3f9c594734d7
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.