This app is a very simple app that blinks an LED red while charging, or green when fully charged while the phone is locked. This helps you to know when to unplug it.
It's been tested on my Nexus 6P and my wife's 5X.
If you want more information:
- The app is just a broadcast receiver which receives the power connected intent.
- It creates a service that runs and monitors the battery change intent.
- On certain values (10%, 20%, .. 100% etc) it updates a notification with the value charged.
- The notification includes a red blinking indicator for charging, and at 100% a green blinking indicator
- Once unplugged, the service is unbound and does not run. So the app has no background utilization while not plugged in.
- The app has one activity which just calls finish() to close itself.
If you are using Android N developer preview, the LEDs will not blink unless you set the app's notification important to level 5.
To do this:
- Bring down settings
- Hold down on the gear wheel at the top to enable System UI Tuner
- Go into System UI Tuner->Other->Power notification controls and turn it ON
- Go into Settings -> Notification and select the BatteryChargeNotification app.
- Set the Importance of the app all the way up
Once you have done this, just open the app (which will flash an activity very fast and go away). Now when you plug in your phone, a notification will appear and the LED will blink RED for charging and GREEN for full.