Giter VIP home page Giter VIP logo

appkillermanager's Introduction

Apache 2.0 License Download

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

FUNCTIONS Huawei Samsung (<5.0) Samsung (>5.0) Asus Xiaomi Letv ZTE Meizu HTC OnePlus
Power Saving Settings N/A NOT AVAILABLE : NO WHITELIST !
Auto Start permission Settings N/A N/A N/A N/A
Notification permission Settings N/A N/A N/A N/A

Maintainers

thelittlefireman

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

dirkam

henrichg

SOURCES/HELPING TOOLS :

backgroundable-android

TamingTask

CRomAppWhitelist

permission

AndroidPopWinPermission

appkillermanager's People

Contributors

thelittlefireman avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.