2

We have implemented Pushy Notifications For our android Application in china.. it is working fine if app is in foreground or background. but when we remove our application from the stack, we cannot receive any notifications..This is only happening when we use Android Phones of China.. please help me out for this case.. Many thanks in advance.

Gaurav
  • 37
  • 1
  • 8
  • Could you show your application source code ? – numa08 Dec 04 '19 at 02:31
  • Hello !! actually this is not Working with Android Phones Of china... for other Android Phones it is working fine.. – Gaurav Dec 04 '19 at 02:33
  • This is a known issue for a long time wrt Chinese phones without Google Play Services. Most phones would have an option called Auto Start in Application settings. Try enabling this. You can nudge users to actually turn on this option. – Dinesh Dec 04 '19 at 05:00

1 Answers1

6

Chinese-manufacturer devices such as Huawei and Xiaomi may not receive notifications after your app is swiped away from the recent apps menu, goes to background, or after a device reboot due to custom power saving features which affect Firebase Cloud Messaging as well.

Most notably, Chinese devices from the following manufacturers include custom power-saving restrictions which may hinder background notification delivery for your app:

  • Xiaomi

  • Huawei

  • OnePlus

  • Samsung

  • Oppo

  • Vivo

  • Asus

  • Sony

  • Honor

In order to receive notifications in the background on these devices, there are two options:

  1. If the affected devices are not within mainland China, we recommend implementing FCM high priority fallback delivery. This is proven to work around several of these manufacturers' custom power saving mechanisms (Xiaomi, OnePlus, and more), by having Pushy deliver your notifications through MQTT and Firebase Cloud Messaging's high-priority channel simultaneously, while only waking up your app once.

  2. Display a dialog asking your users to whitelist your app from the respective manufacturer's power saving mechanism, within the device settings. The steps for achieving this are different for each manufacturer.

More info about this issue:

https://dontkillmyapp.com/

Elad Nava
  • 7,746
  • 2
  • 41
  • 61
  • Thanks for your support, but we have seen that notifications from linkedIn Application is working fine. – Gaurav Dec 09 '19 at 05:18
  • 3
    @Gaurav, that's because all of these manufacturers pre-whitelist the popular apps (LinkedIn / Facebook / Messenger / WhatsApp / Slack / etc). That's why they just work automatically and your app doesn't. – Elad Nava Dec 09 '19 at 05:34
  • 1
    Thanks @EladNava it helped. It resolved my pushy notification issue as well as Fcm issue. Live long buddy!! – divaPrajapati09 Sep 04 '20 at 06:49
  • @divaPrajapati09 we are having the same issue with FCM. How did you solve the issue? – Rumit Patel Mar 02 '22 at 14:39
  • @RumitPatel Make sure to send high-priority notifications through FCM which is the best way to ensure notifications are delivered to Chinese Android phones when your app is not running. Otherwise, instruct users using those phones to whitelist your app from the battery optimizations mentioned in "dontkillmyapp.com". – Elad Nava Mar 02 '22 at 18:41
  • @EladNava Thanks very much for your response. I'll look into it. – Rumit Patel Mar 03 '22 at 04:35