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

Popular posts from this blog

many to many - Django Rest Framework ManyToMany filter multiple values -

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

Java Entity Manager - JSON reader was expecting a value but found 'db' -