Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xiaomi BOOT_COMPLETED not received

My aim is to receive BOOT_COMPLETE through a broadcast receiver. I have implemented it according to Piyush's answer in BOOT_COMPLETED not working Android and it is working on a Nexus5. But it doesn't work on my Xiaomi mi5s even though I have turned on autostart for my app in MIUI's security app.

p.s: I am on MIUI 8.2.1.0.

like image 676
saiedmomen Avatar asked Nov 26 '25 03:11

saiedmomen


2 Answers

Hey little late but I just got to this issue also. Problem with Xiaomi devices is that they block autostarting of the application so it does not receive the BOOT_COMPLETED Broadcasts. To be able to receive it the user has to enable the application to autostart in settings.

There are already multiple solutions for this issue: answer from Mohit Mathur or answer from Dika.

There are two main things to note:

  • You cannot actually check if the app has the autostart enabled or not.
  • This is not issue only for Xiaomi but for some Huawei, HTC and other devices too.
like image 137
David Sucharda Avatar answered Nov 28 '25 20:11

David Sucharda


To add to David's answer. You must also change the Battery Saver settings to No Restrictions on MI phones to receive the intent.

like image 44
Terra Avatar answered Nov 28 '25 20:11

Terra



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!