So I am trying to make my app auto-start So to do this i have to redirect the user to the auto start screen of the devices. I tried calling intent similar as we get the battery detail app in flutter but it's not working, how to make app autostart any guidance will be helpful.github issue
what I am looking for an alternate way of using this intent to open auto-start screen in oppo
Intent intent = new Intent();
intent.setClassName("com.coloros.safecenter",
"com.coloros.safecenter.startupapp.StartupAppListActivity");
startActivity(intent);
this is for Xiaomi
Intent intent = new Intent();
intent.setComponent(new ComponentName("com.miui.securitycenter",
"com.miui.permcenter.autostart.AutoStartManagementActivity"));
startActivity(intent)
this intent in flutter. I already looked into flutter intent
I got your question. You can try the following for Xiaomi devices
static const platform = const MethodChannel('com.myapp/intent');
void openAutoStartSettings() async {
await platform.invokeMethod('com.miui.permcenter.autostart.AutoStartManagementActivity');
}
For other manufacturers, please check this post https://tutel.me/c/programming/questions/48166206/how+to+start+power+manager+of+all+android+manufactures+to+enable+background+and+push+notification