1

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)

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Dpoint
  • 51
  • 4
  • 1
    Force closing an app will kill its services, which prevents it from receiving notifications. See http://stackoverflow.com/questions/40753765/fcm-not-received-if-app-is-killed-even-not-showing-in-system-tray – Frank van Puffelen Dec 07 '16 at 08:40
  • But when I force close WhatsApp I still receive notifications – Dpoint Dec 07 '16 at 08:43

1 Answers1

2

The Huawei devices have a 'protected apps' settings option... This option kill the apps and app services when the screen is off, what happens? This one kills our fcm service when screen turns off. Actually not existing a programmatically code to solve this, the best option is show a dialog to advice user as can solve this the user just needs let app as protected.

You can find more info in this post. Let me know if I have helped you and good programming!

  • for wearable connection you have to enable all of the applications: http://stackoverflow.com/a/41622804/1979882 – Vyacheslav Jan 12 '17 at 20:57