Xiaomi does not receive a notification when the application is not running

android, google-cloud-messaging, push-notification

Solution

From https://www.cricketbuddies.com/cricket/world-cricket-championship-2/guides/wcc2-guides, "Game Notification Fix" section:

There are five settings that needs to be done manually in case of xiaomi to properly run any application. I have done a lot of research on this and there's no way to fix these settings programmatically. These are the settings:

- Auto Start -> ON (Toggle and restart your app)

- MIUI Optimization under Developer Options -> OFF

- Memory Optimization under Developer Options -> LOW/OFF

- No restrictions on background activities under Battery & Performance Settings

- Battery Saver -> OFF

There are many other devices in which the manual settings needs to be done in order for the app to work as expected e.g. Lenovo, some Micromax devices. Companies impose these kind on restrictions on background activities to improve the overall battery life. Some apps like facebook and whatsapp work correctly as these might have been included as system apps.

Problem

I am working on an application where I am using Google Push Notification. The application receives a notification when it is running in Xiaomi phone. Otherwise, when it's killed, it does not receive a notification. If we want to receive a notification if the application is killed then we need to allow auto restart app manually from the security app of Xiaomi. I want any trick to do this programmatically without asking the user. Is there a way to do this? http://en.miui.com/thread-33826-1-1.html

Original source

Related problems