FORUMS

PSA: You Can Optimize Your Note 4’s Recents Menu & RAM

The Note 4 never had the fastest Recents Menu, and despite its 3GB of RAM, … more

XDA Picks: Best Apps of the Week (July 25 – Aug 1)

Apps are at the front and center of any smartphone experience, and with over a … more

Voices Of XDA: Orbiting The Earth With Android

Editor’s note: This week’s feature has been written by forum … more

CloudPlayer: DIY HiFi Music Streaming Solution

In our Helpful Guide to Music Streaming Services, we mentioned several different services … more

[Xposed] Battery Shutdown Manager

4,959 posts
Thanks Meter: 34,972
 
By tonyp, Recognized Developer / Contributor on 10th May 2015, 06:44 PM
Post Reply Subscribe to Thread Email Thread
Battery Shutdown Manager

Download @ Google Play


Do you know that moment when you're on 1% of battery and think "I'll just use my device 20 more seconds then I'll get my charger" - and at exactly that moment it'll switch to 0% and you'll see the threaded "Shutting down" dialog and know it's too late now?
This Xposed module will help by showing you a dialog with a countdown before the actual shutdown, so you'll have time to attach your charger.

The module achieves this by postponing the shutdown for a couple of seconds to give you time to connect the charger.

Please post any kind of feedback or ideas you have regarding this app
I tested the module a lot but can't possibly test it for all those different phones and versions out there.
Thus I will flag it as beta for now so you can provide feedback before I'll release the 1.0 version.
It would be great if some more people could test it. I used the StabilityTest app to quickly drain my battery down to 0%.


Compatibility:
I wrote this module and tested it with AOSP devices as well as on Cyanogenmod.
It should work without any issues on all Nexus and Google Play Edition devices from Android 4.2 to 5.1+.
As almost all Custom ROMs are based on either AOSP or CM they should work without issues, too.

Some vendors (LG, Samsung, Sony etc.) might have changed the original code and thus render this module incompatible on their device. Nothing bad will happen when you install it, it just won't work.

Devices confirmed not compatible:
  • Currently not working for LG Stock ROMs due to internal code changes by LG.
  • Android devices <4.2. Support for Android 4.0.3+ and 4.1 might be added when I see a greater demand for it.


Installation:
- Download the app
- Activate the module in the Xposed Insaller
- Reboot your device
- Open the app to change it's options to your liking


Bugs/Issues:
If you encounter any bugs just report them here and I'll try to fix them. Always include as much information as possible, including your device model, android version and exact ROM details.
Note that I will most likely need a log to fix the issue, a generic "doesn't work on phone xyz" won't help me fixing the issues.
There are two possibilities to get a log.
  1. Use the Catlog app. In the app press Menu > Record Log before the device shuts down, then attach the logcat to your bugreport.
  2. Alternatively you need to use adb to grab the log.
    Unfortunately logging is a bit more complicated for this module as the interesting part happens on shutdown.
    The best solution (and what I do personally for debugging this app) is to use ADB over WiFi (e.g. with this app) and grab the log.


Download:

Google+:

Last but not least an obligatory huge thanks to @rovo89 for his amazing Xposed framework!



If you like this module don't forget to press thanks, rate this thread with 5 stars, consider a donation etc. etc.

Attached Thumbnails
Click image for larger version

Name:	Screenshot_2015-05-11-02-53-23.png
Views:	4702
Size:	208.4 KB
ID:	3306615   Click image for larger version

Name:	Screenshot_2015-05-11-02-53-34.jpg
Views:	4626
Size:	82.6 KB
ID:	3306616   Click image for larger version

Name:	Screenshot_2015-05-10-15-00-47.png
Views:	4576
Size:	209.6 KB
ID:	3306617   Click image for larger version

Name:	Screenshot_2015-05-10-15-01-26.png
Views:	4270
Size:	141.9 KB
ID:	3306618  
Last edited by tonyp; 19th June 2015 at 03:33 PM.
The Following 26 Users Say Thank You to tonyp For This Useful Post: [ View ]
 
 
10th May 2015, 06:44 PM |#2  
tonyp's Avatar
OP Recognized Developer / Contributor
Thanks Meter: 34,972
 
Donate to Me
More
Last edited by tonyp; 11th May 2015 at 03:14 AM.
The Following User Says Thank You to tonyp For This Useful Post: [ View ]
11th May 2015, 03:16 AM |#3  
Junior Member
Thanks Meter: 1
 
More
I love your icon pack!
11th May 2015, 03:37 AM |#4  
mobihack's Avatar
Senior Member
Flag Ottapalam, Pallakad
Thanks Meter: 43
 
More
Tried it on my cm12.1. No bootloops here. Will edit after full uncharging
EDIT: Turned turning on full brightness, hot spot, gps, flashlight, mobile data, etc... Still 8% to go. Your module and me are waiting eagerly lol
EDIT2: Finally reached 0
And tonyp, I am pleased to say your module works in cm12.1
Suggestion: Make the dialog box closable. So if I am playing a game or writing to a File I can save my progress. Hope you understand.
And I appreciate your idea. Well implemented.
And do you mind sharing that icon pack :hungry:
Last edited by mobihack; 11th May 2015 at 09:38 AM.
11th May 2015, 05:40 AM |#5  
Senior Member
Thanks Meter: 66
 
More
Samsung galaxy s3 i9300 4.3 mk6 stock rom, bootloops.

Sent from a stolen phone!
The Following User Says Thank You to shivadow For This Useful Post: [ View ]
11th May 2015, 08:12 AM |#6  
DecypherT's Avatar
Senior Member
Thanks Meter: 25
 
More
Bootloop on Nexus 4, Stock Android 4.3.3...

EDIT Because OP asked how the bootloop occurs on Nexus 4, Android 4.3.3:
Bootloop occurs after activating module and normal (not soft) reboot.
Before reboot app can be runned and configurated.

I have no log app running, so I'm not able to deliver logs.
Last edited by DecypherT; 13th May 2015 at 09:51 AM.
11th May 2015, 09:12 AM |#7  
alezardstar's Avatar
Senior Member
Thanks Meter: 248
 
More
Quote:
Originally Posted by shivadow

Samsung galaxy s3 i9300 4.3 mk6 stock rom, bootloops.

Sent from a stolen phone!

Quote:
Originally Posted by DecypherT

Bootloop on Nexus 4, Stock Android 4.3.3...

Folks, try to grab a logcat please. It'd useful for the dev and we might cope with that bug for next release. If you read the OP, he already linked some threads and an app which would be useful for you grabbing the log and therefore, you may share it with us, here.

Edit: tested successfully in a Moto G running stock 5.0.2 EU ROM. Thank you, Tony!
Last edited by alezardstar; 11th May 2015 at 10:13 AM.
11th May 2015, 10:37 AM |#8  
tonyp's Avatar
OP Recognized Developer / Contributor
Thanks Meter: 34,972
 
Donate to Me
More
Yes, please send me a logcat. Bootloops are great, then you can just get the log after the reboot. I literally can't do anything without a log.


Quote:
Originally Posted by mobihack

Tried it on my cm12.1. No bootloops here. Will edit after full uncharging
EDIT: Turned turning on full brightness, hot spot, gps, flashlight, mobile data, etc... Still 8% to go. Your module and me are waiting eagerly lol
EDIT2: Finally reached 0
And tonyp, I am pleased to say your module works in cm12.1
Suggestion: Make the dialog box closable. So if I am playing a game or writing to a File I can save my progress. Hope you understand.
And I appreciate your idea. Well implemented.
And do you mind sharing that icon pack :hungry:

Thanks for the feedback, then I will add 5.1 to the compatibility at the Play Store.

Regarding the closable dialog, I made it non closable on purpose but I'll consider adding an experimental feature to change that. At first I'd like to fix the bugs, though.
The Following User Says Thank You to tonyp For This Useful Post: [ View ]
11th May 2015, 11:16 AM |#9  
mobihack's Avatar
Senior Member
Flag Ottapalam, Pallakad
Thanks Meter: 43
 
More
Quote:
Originally Posted by tonyp

Thanks for the feedback, then I will add 5.1 to the compatibility at the
Regarding the closable dialog, I made it non closable on purpose but I'll consider adding an experimental feature to change that. At first I'd like to fix the bugs, though.

More suggestions:
Add some animations to the dialog
Add option for an alert tune or notification 1min before

Add buttons to dialog box for shutdown(sometimes I dont like to wait)[optional]

Happy with what you had already done and you forgot me an icon pack
11th May 2015, 01:56 PM |#10  
akhilkbaby's Avatar
Junior Member
Flag Cochin
Thanks Meter: 0
 
More
bootloops
Bootloop on MMX Canvas Magnus stock ROM (JB 4.2.1)
11th May 2015, 03:20 PM |#11  
tonyp's Avatar
OP Recognized Developer / Contributor
Thanks Meter: 34,972
 
Donate to Me
More
Quote:
Originally Posted by akhilkbaby

Bootloop on MMX Canvas Magnus stock ROM (JB 4.2.1)

I'd like to fix the issue, could you kindly send me a logcat of the bootloop?
Unfortunately there is literally nothing I could possibly do without a log.


Quote:
Originally Posted by mobihack

More suggestions:
Add some animations to the dialog
Add option for an alert tune or notification 1min before

Add buttons to dialog box for shutdown(sometimes I dont like to wait)[optional]

Happy with what you had already done and you forgot me an icon pack

I'm using the stock dialog which guarantees the highest possible compatibility with other devices.

Regarding the notification, I don't know when the battery will be empty before, so there's no way to display a message one minute before. All I could do is starting the dialog at 1% (which I'm considering for a future version), but that would be quite different.

I like the idea for a shutdown button, an option to include that will be in an upcoming version.

Oh, true, the icon pack is called etched material.
Last edited by tonyp; 11th May 2015 at 07:17 PM.
The Following User Says Thank You to tonyp For This Useful Post: [ View ]

Read More
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes