Some Android devices due to custom Android tweaks are done by manufacturers has some politics about Power Management that breaks some features like push notifications.
- Huawei - Only Pre-EMUI 5.0 / Android 7 - Go to Settings > "Protected apps", check your app.
- Sony - Tap on the battery icon. Go to Power Management > STAMINA mode > Apps active in standby > Add your app.
- Asus - Check your app in the Auto-start Manager.
- Xiaomi - Security (App) > Permissions > Autostart - Enable your app
- *New Xiaomi - Settings > Developer Options. Disable "memory optimization". To enabled Developer Options go to Settings > About. Tap on MIUI 8 times.
- Oppo - Go to Settings > "Security settings" > "Data saving" and enable your app.
- Samsung - Disable battery usage optimizations
I want to collect intents to launch respective tools, but I have found only for Huawei and Xiaomi.
Intent INTENT_HUAWEI = new Intent().setComponent(new ComponentName("com.huawei.systemmanager", "com.huawei.systemmanager.optimize.process.ProtectActivity"));
Intent INTENT_XIAOMI = new Intent().setComponent(new ComponentName("com.miui.securitycenter", "com.miui.permcenter.autostart.AutoStartManagementActivity"));
if (getPackageManager().resolveActivity(INTENT_HUAWEI, PackageManager.MATCH_DEFAULT_ONLY) != null)
startActivity(INTENT_HUAWEI);
else if (getPackageManager().resolveActivity(INTENT_XIAOMI, PackageManager.MATCH_DEFAULT_ONLY) != null)
startActivity(INTENT_XIAOMI);
I need help from all other producers, thz