How to enable AutoStart option for my App in Xiaomi phone Security App programmatically in android -
my app working remarks in mobile except mi. because mi restricting app background service run. after enabling app in autostart in security, working perfectly. can enable autostart option app in mi security app through programmatically. please let me know valuable suggestions.
and doubt how whatsapp , facebook , many more apps default enabling autostart option in security app in xiaomi?
thanks in advance.
try this...it's working me. open screen enable autostart.
string manufacturer = "xiaomi"; if(manufacturer.equalsignorecase(android.os.build.manufacturer)) { //this open auto start screen user can enable permission app intent intent = new intent(); intent.setcomponent(new componentname("com.miui.securitycenter", "com.miui.permcenter.autostart.autostartmanagementactivity")); startactivity(intent); }
Comments
Post a Comment