We are developing a application like google calendar where we need to notify the user at the right time on OFFLINE. Other than MIUI, it is working fine. But in MIUI devices, the user should enable the AUTO_START permission for our application. We are using below code snippet to open the AUTO_START page programmatically (Right me, If I am wrong).
public boolean invokeAutoStartPermission(Context context) {
try {
Intent intent = new Intent();
intent.setClassName("com.miui.securitycenter", "com.miui.permcenter.autostart.AutoStartManagementActivity");
context.startActivity(intent);
} catch (Exception e) {
return false;
}
return true;
}
But we have to ask this permission to the user when it is disabled. Unfortunately we couldn't able to find the code snippet to check the status of the AUTO_START permission for my application.