On Xiaomi MI devices, there is a function to disable / enable "AutoPlay" in the application for security. (In the application "Security" - "Permissions" → "Autostart")

This means that none of the broadcast receivers receive anything while the application is not running. Therefore, BOOT_COMPLETED, USER_PRESENT, CONNECTIVITY_CHANGE, etc. Does not work. (They work for a while after the application is in the foreground, but will stop soon). They also stop working after the user checks the application from the Xiaomi version of “latest applications”
Even GCM can't wake him up
For messaging apps, this is a killer.
By default, applications such as Whatsapp, Messenger, Flipkart, etc., are enabled by default (even if these applications are not installed in advance).
Most other applications are disabled by default. eg. By default, slack is disabled.
Is there any way to change this whitelist by default?
android android-service android-broadcastreceiver android-broadcast
Gautam
source share