AppKillerManager
Android library to handle App killer manager, agressive power saving mode or battery optimization (Xiaomi, Huawei, letv, ...) and prevent from : not showing notification, services not start at boot, etc
This library will open the right settings of the user phone and prompt him to add your app to whitelist.
Android Custom Roms made sometimes your apps unfunctional due to :
- Your App is killed when it's not in foreground
- Notification message do not appear
- Your services is killed by agressive power saving mode
###If you want to help me do not hesitate to test on your phone and add issue if somethings not work properly
Please if you have a ZTE, Meizu, Oppo, OnePlus, HTC, Letv test this library to help me, Thanks a lot ! =)
Current Compatibility :
- Samsung (TESTED)
- Huawei (TESTED)
- Xiaomi (TESTED)
- Meizu ( NOT TESTED)
- OnePlus (NOT TESTED)
- Letv (NOT TESTED)
- HTC (NOT TESTED)
- Asus (TESTED)
- ZTE (NOT TESTED)
TODO
- Oppo
- Vivo
- Add Tests auto with avd and intent testing
- Add hability to customize dialog
- Add screenshot and "settings path" of the intent action for all phones on ReadMe
- Add a table of possiblities and function unavailable/ not necessary on each device
Usage
Step 1
Add it on your Android app
dependencies {
implementation 'com.thelittlefireman:AppKillerManager:2.1.1'
}
Step 2
Use with a custom dialog:
public void startDialog(KillerManager.Actions actions) {
new DialogKillerManagerBuilder().setContext(this).setAction(actions).show();
}
Or use it directly :
// Open the corresponding Power Saving Settings
KillerManager.doActionPowerSaving(MyContext);
// Open the corresponding Auto Start permission Settings
KillerManager.doActionAutoStart(MyContext);
// Open the corresponding Notification permission Settings
KillerManager.doActionNotification(MyContext);
Working phone & related views :
Tab of which activity is open when you call functions
Maintainers
TODO :
- Test on all devices
- Add differents settings for autostartservice/notifications/permissions
- Add custom messages for more explaination on what user need to do on manufacturer "settings Activity"
- Add custom image for each device and each languages
DEBUG/HELPING INFORMATIONS :
###Get the current activity name :
$> adb shell
$> dumpsys activity activities | grep mFocusedActivity
or to get more result
$> dumpsys activity activities | grep Activity
###Start an activity :
$> adb shell
$> #by component name
$> am start -n com.samsung.memorymanager/com.samsung.memorymanager.RamActivity --user 0
$> #by action
$> am start -a com.exemple.Action --user 0
more information http://imsardine.simplbug.com/note/android/adb/commands/am-start.html
Phone tested :
(EasyMode) = Go directly to package (app) ?
PHONE | ANDROID OS | CUSTOM ROM | AutoStart(EasyMode) | PowerSavingMode(EasyMode) |
---|---|---|---|---|
Huawei HONOR 4X | Android 4.4 | EMUI 3.0.1 | OK (No) | |
Huawei P9 LITE | Android 6.0 | EMUI 4.1 | OK (No) | |
Samsung S7 edge | Android 7.0 | N/A | OK | |
Samsung Xcover | Android 5.1 | N/A | OK | |
Samsung S4 mini | Android 4.4 | N/A | N/A | |
Xiaomi Mi mix | Android 6.0.1 | MIUI 8.0 | OK (No) | OK (Yes) |
ANDROID OS | CUSTOM ROM | AutoStart EasyMode | AutoStart List | PowerSavingMode EasyMode | PowerSavingMode List |
---|---|---|---|---|---|
Android 4.4 | EMUI 3.0.1 | ACTION huawei.intent.action.HSM_PROTECTED_APPS | |||
Android 6.0.1 | EMUI 4.1 | ACTION huawei.intent.action.HSM_PROTECTED_APPS | |||
Android 6.0.1 | MIUI 8.0 | ACTION miui.intent.action.OP_AUTO_START | INTENT "com.miui.powerkeeper", "com.miui.powerkeeper.ui.HiddenAppsConfigActivity" extras : package_name,package_level | ACTION miui.intent.action.POWER_HIDE_MODE_APP_LIST |
THANKS TO:
Sylvain BORELLI