How can I receive notifications everytime?

时间:2016-12-07 08:32:24

标签: cordova firebase firebase-cloud-messaging

I am developing an application with cordova and I am using a firebase plugin to receive push notification. My problem is: when I kill my app from multitasking I stop receiving. How can I receive these notifications every time?

My device is Huawei P9 with Marshmallow (Emui 4.1.1)

1 个答案:

答案 0 :(得分:2)

华为设备有“受保护的应用”设置选项...此选项终止应用应用服务< / strong>当屏幕关闭时,会发生什么?当屏幕关闭时,这个会杀死我们的fcm服务。实际上不存在以编程方式解决这个问题的代码,最好的选择是显示一个建议用户的对话框,因为可以解决这个问题,用户只需要让app受保护。

您可以在此post中找到更多信息。如果我帮助了你并且编程很好,请告诉我们!