Unity-Technologies / NotificationsSamples

Sample project for Unity Notifications
Other
283 stars 50 forks source link

Notification are not being shown when application is fully closed #1

Closed studentutu closed 4 years ago

studentutu commented 5 years ago

Good afternoon everyone, we have built and run the demo on our Android device(Android 6.0). Everything works like a charm, but when the application is fully closed by the user, there are no notifications afterward... Could you explain if the current version of Unity Mobile Notifications Package support push notification even when the app is not running?

krisuman commented 5 years ago

Hi @studentutu, I have exactly same issue. Did you found some solution for that?

qwyt commented 5 years ago

What device are you testing on? Seems that Huawei (including Honor) and Xiaomi utilize aggresive batter saver techniques which restrict app background activities unless the app has been whitelisted by the user in device settings. This means that any scheduled notifications will not be delivered if the app is closed or not running in the bacgkround on their devices.

krisuman commented 5 years ago

It was Huawei Honor 9 Lite ;)

qq1545372477 commented 5 years ago

Samsung Galaxy S8 has the same issue

MechaCondor commented 5 years ago

Hi, Oppo R11 is also facing the same issue.

Gifgroen commented 4 years ago

When an app is closed the notification service receiving messages might not always run. But if this happens a user chose to actively kill it, aka he/she might not want notifications at that time. I understand the desire to activate users again when this happens. I am not sure if Android will allow/support this behavior.

Long story short: this sounds like a restriction from Android, not Unity or this package.

studentutu commented 4 years ago

What device are you testing on? Seems that Huawei (including Honor) and Xiaomi utilize aggresive batter saver techniques which restrict app background activities unless the app has been whitelisted by the user in device settings. This means that any scheduled notifications will not be delivered if the app is closed or not running in the bacgkround on their devices.

Yep, it was Xiaomi !