How To Start An Activity From Background in Android 10?

Not sure if it’s right to do it this way, but I did not have enough time (app is only for company internal use). I used permissions: <uses-permission android:name=”android.permission.FOREGROUND_SERVICE”/> <uses-permission android:name=”android.permission.SYSTEM_ALERT_WINDOW”/> and then every user has to go to setting -> permissions of the app and then check box in advanced settings for function “show … Read more

Background Services are restricted in Xiaomi and Oppo

Finally I’ve found the answer here private static final Intent[] POWERMANAGER_INTENTS = { new Intent().setComponent(new ComponentName(“com.miui.securitycenter”, “com.miui.permcenter.autostart.AutoStartManagementActivity”)), new Intent().setComponent(new ComponentName(“com.letv.android.letvsafe”, “com.letv.android.letvsafe.AutobootManageActivity”)), new Intent().setComponent(new ComponentName(“com.huawei.systemmanager”, “com.huawei.systemmanager.startupmgr.ui.StartupNormalAppListActivity”)), new Intent().setComponent(new ComponentName(“com.huawei.systemmanager”, “com.huawei.systemmanager.optimize.process.ProtectActivity”)), new Intent().setComponent(new ComponentName(“com.huawei.systemmanager”, “com.huawei.systemmanager.appcontrol.activity.StartupAppControlActivity”)), new Intent().setComponent(new ComponentName(“com.coloros.safecenter”, “com.coloros.safecenter.permission.startup.StartupAppListActivity”)), new Intent().setComponent(new ComponentName(“com.coloros.safecenter”, “com.coloros.safecenter.startupapp.StartupAppListActivity”)), new Intent().setComponent(new ComponentName(“com.oppo.safe”, “com.oppo.safe.permission.startup.StartupAppListActivity”)), new Intent().setComponent(new ComponentName(“com.iqoo.secure”, “com.iqoo.secure.ui.phoneoptimize.AddWhiteListActivity”)), new Intent().setComponent(new ComponentName(“com.iqoo.secure”, “com.iqoo.secure.ui.phoneoptimize.BgStartUpManager”)), new Intent().setComponent(new … Read more