I'm not able to start activity in MIUI 11 redmi note 6 pro mobile, I am getting error as:
com.android.server.am.ExtraActivityManagerService: MIUILOG- Permission Denied Activity
I found some solution like turn on "start in background" permission. I can't find something like this with MIUI 11. Literally I have no idea about this issue. Thanks in advance.
The Android autostart management is used to ease you in starting your favorite applications on your device through one click. These types of applications make it easy for you to manage resources on your phone. The application allows you to pick one app that'll be launched whenever you reboot your device.
Open settings application. Tap on Apps. Go to Manage apps. You will now see a list of applications.
Use QTI Memory Optimization(root) This is a Magisk module that patches some libraries in Android and makes the whole Android run lighter and stop killing the apps as well.
I have a similar problem with starting activity from BroadcastReceiver when application is stopped.
1) You can find your app in the settings and allow permission "start in the background".
2) If you need to allow permission programmatically, try to open application settings
This code will open applicatin permissions settings in which you should allow "start in the background"
Intent intent = new Intent("miui.intent.action.APP_PERM_EDITOR");
intent.setClassName("com.miui.securitycenter",
"com.miui.permcenter.permissions.PermissionsEditorActivity");
intent.putExtra("extra_pkgname", getPackageName());
startActivity(intent);
This code will open the applicatin settings in which you should open permissions and allow "start in the background" permission
Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
Read more about android settings intents: How to open application permission window in app settings programmatically
And you can also check the code from github to work with permissions in different system wrappers like flyme, miui, oppo etc: https://github.com/zhaozepeng/FloatWindowPermission
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With