1

I am trying to get(programaticaly) auto start option value(on/off) of my app in MIUI devices. On the base of its value, i need to open security app from my app to set auto start value.

Your help is appreciated. Thanks

Sangam_cs
  • 199
  • 2
  • 11
  • Don't know if this is possible, I own a Xiaomi with MIUI 8 and I never saw this in any app I use, I always have too go to the permission settings. But maybe you can make it using Intent. – Diogo Rosa Jun 07 '17 at 11:03
  • Check this: https://stackoverflow.com/questions/33818970/how-to-open-app-permission-settings-in-miui-devices-programmatically Like I said, maybe you can via Intent – Diogo Rosa Jun 07 '17 at 11:07

1 Answers1

0

You can do it via official MI intent

Intent intent = new Intent("android.settings.APPLICATION_DETAILS_SETTINGS");
intent.setClassName("com.miui.securitycenter", "com.miui.permcenter.permissions.AppPermissionsEditorActivity");
intent.putExtra("extra_pkgname", "app_package_name");
Rahul Arora
  • 21
  • 1
  • 4