androidpush-notificationpushy

Pushy Notifications not working if Android Application is not in stack in china Android Phones


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.


Solution

  • 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:

    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/