pushy / pushy-react-native

The official Pushy SDK for React Native apps.
Apache License 2.0
16 stars 20 forks source link

Android can't receive notification when app is killed #59

Closed Richtervn closed 3 years ago

Richtervn commented 3 years ago

My device can't receive notification when app is killed.

Device Info: Model: ASUS_Z012D Android version: 8.0.0

I'm using: react-native: 0.63.3 pushy-react-native: 1.0.15 implementation 'me.pushy:sdk:1.0.66' implementation 'me.pushy:sdk-react-native:1.0.15'

Note:

pushy commented 3 years ago

Hi @Richtervn, Thanks for your issue report.

Please try to follow the instructions mentioned on the following page as per disabling Asus PowerMaster features, and check if it resolves the issue: https://dontkillmyapp.com/asus

Richtervn commented 3 years ago

Thanks for your support.

With your instructions, I still can't receive notifications normally when my app is suspended. I reinstalled my app and it worked now. However, I'm wondering that normal users will never do this. Is there anyway I can archive this programmatically?

pushy commented 3 years ago

Hi @Richtervn, Yes, the best course of action to keep receiving notifications after your app is swiped away, is to implement FCM high priority fallback delivery.

This is proven to work around several of these manufacturers' custom power saving mechanisms (Xiaomi, OnePlus, Asus, 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.

Please give it a try and let us know if you still need assistance.