Boot BroadcastReceiver does not work on Xiaomi devices

守給你的承諾、 提交于 2019-11-27 22:28:50

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!