How to enable AutoStart option for my App in Xiaomi phone Security App programmatically in android

后端 未结 3 1814
失恋的感觉
失恋的感觉 2020-12-01 03:11

My App is working with good remarks in all mobile except MI. Because MI restricting my App background service to run. After enabling App in Autostart in Security, it working

3条回答
  •  抹茶落季
    2020-12-01 03:29

    Facebook, Whatsapp, Messenger and few more popular apps are whitelisted by Xiaomi. Hence they get enabled by default. Other apps need to be enabled by users. We don't have any other option.

    We need to programmatically detect the manufacturer using Build.MANUFACTURER in android and show a dialog which suggests the user to enable the app in AutoStart, if the manufacturer is Xiaomi

提交回复
热议问题