Boot BroadcastReceiver does not work on Xiaomi devices

前端 未结 1 1722
隐瞒了意图╮
隐瞒了意图╮ 2020-11-30 09:06

I have a following BroadcastReceiver which should run after boot completion. I have tested it on my Xiaomi device (Redmi 1s), it\'s not running

相关标签:
1条回答
  • 2020-11-30 09:47

    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

    0 讨论(0)
提交回复
热议问题