使用 FCM 关于推送无法接收的问题(Firebase 推送)

来源:互联网 发布:想做淘宝客服怎么申请 编辑:程序博客网 时间:2024/04/29 06:27

 问题:当 app 处于后台和关闭时,无法接收 pushmessage

当app 处于后台的无法收到push message的解决方法:我也不知道,后面是老大说配置错了,然后改了之后,就可以接收了。

当 app 关闭的时候无法接收 push message 的解决方法:官方回复我如下:

——————————————————————————————

For receiving push messages while app is closed, could you please try adding priority=high to your payload? You could check this StackOverflow post for reference

——————————————————————————————

原本的priority是5,后来改成10。(我也不知道这是什么意思)


ps:检查项目工程中的 Capabilities中的 BackgroundModes是否打开 remote notification。

另外虚拟机无法获取device token

0 0