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?
I faced a similar issue and fixed it by adding a BOOT_COMPLETED receiver to my app.
Add the following to the manifest:
Then create your BootReceiver class:
It should work with this.