Boot BroadcastReceiver does not work on Xiaomi devices

I searched around the web and found a solution, I’ve decided to answer my own question. Follow the same code given in the question.

In Xiaomi devices, you just have to add your app to Autostart list, to do so, follow these simple steps given below:

  1. Open Security app on your phone.

  2. Tap on Permissions, it’ll show you two options: Autostart and
    Permissions

  3. Tap on Autostart, it’ll show you list of apps with on or off toggle
    buttons.

  4. Turn on toggle of your app, you’re done!

Now, reboot your phone, you’ll see a Toast message I am Running

Leave a Comment