BattMonX is a utility for the Motorola Droid X (also works for other Motorola Droid-class phones) for turning on a phone's LED indicator light (when the screen is off) to represent the battery's current state (charging, charged, discharging, or low-battery). Version 1.8 now allows a rooted Motorola Droid-class phone to have the LED on while the screen is on. This app was originally written for the Motorola Droid X whose LED indicator was not enabled during charging like many other phones do.
Additionally, for phones like the Droid X with a tri-color LED (red/green/blue), a variety of colors may be selected to differentiate the various battery states (OFF, red, green, blue, yellow, orange, deep sky blue, dark violet, dark green, and dark orange). Version 1.8 includes the color "amber" for those phones that support an amber LED indicator. Also, rooted Motorola Droid-class phones can choose "white" as a color option when used with the "LED is Always ON" experimental (and root-only) feature.
PHONE COMPATIBILITY
This app will not work on all phones. For example, the Samsung Vibrant and Captivate do not have LED indicators. Some phones only have a two-color LED (the HTC Eris and Evo 4G both have a green/amber LED; the Epic 4G supports a red/blue LED) which might allow for partial functionality from this app (especially if rooted). Additionally, its clear from testing that some phone's firmware interferes or does not fully implement the standard Android LED notification functionality identically to the Motorola Droid-class of phones.
Extensive logic has been added in version 1.7 and 1.8 in an attempt to support other phones. Version 1.8 now implements a strategy for dynamically finding a phone's battery state files (specifically the "status" and "capacity" files). Additionally, the LED notification directories are identified to determine their location and which color brightness files are supported by your phone's LED. Please contact me at scary.alien@gmail.com for instructions on how to provide debugging information so I can try to support your phone.
USAGE and NOTES
* Launch the BattMonX app and press the "Start Monitoring Battery Status" button. Monitoring will take place in the background and the app may be safely exited via the BACK or HOME keys.
* While monitoring is active/enabled, the app will check the battery state at a user-selectable polling interval and set the LED state as specified.
* To exit the BattMonX UI but continue monitoring, use the BACK or the HOME key--the app's service logic will continue monitoring the battery state in the background.
* To discontinue monitoring, recall or re-launch the app and press the "Stop Monitoring and Exit" button.
* Version 1.6 and higher now allows BattMonX to work alongside SMS text notifications. After viewing the text message or clearing the notification, BattMonX will resume battery state monitoring at the start of the next polling interval. Version 1.8 of the app implements a new strategy to make the app much more responsive (30 seconds or less) to SMS notifications.
* To have the app automatically monitor the battery state after a reboot, enable the "Set on Boot" option in the second menu page.
* Use the "Display Current Settings" menu item to see app's current state and settings.
* Use of the low-battery indicator is optional. If enabled however, it will take precedence over all other settings (i.e., as long as the current battery percentage full is less than or equal to the low-battery threshold, the low-battery action will be taken and used regardless of the other charging or discharging settings).
* This app does NOT require root; requires minimal permissions; uses very little CPU and system resources. Version 1.8 does include some new experimental features that require root such as the "LED Always On" feature to enable turning the LED on while the screen is on (not available on a stock Droid X).
* If you use a task killer, be sure to exclude the BattMonX app.
* You should also be aware that many phones turn OFF the LED when turning the screen on or off. The app should re-light the LED when/if appropriate at the top of the next polling interval. Additionally, Android will suspend non-system app processing when the screen is turned off. This might cause BattMonX to not be able to update the LED status while the screen is off since it (and all other apps) are not being given CPU cycles for processing. When the screen is turned back on or an SMS text message is received, the app should wake-up and resume updating the LED status as normal.
EXPERIMENTAL FEATURES
Version 1.8 brings some new experimental features to BattMonX:
- An "LED is always ON" (for rooted phones only) to light the LED while the screen is on (normally, at least for the Droid X) the LED is only display while the screen is off. This experimental feature bypasses the notification API and updates the LED notification's brightness files directly. If you use this feature with the set-on-boot option, be sure that you tell the SuperUser app to "remember" the "allow" setting so that the app will resume expected monitoring (otherwise, the app will automatically turn off the "LED is always ON" setting). Also, there is currently no "blink" functionality available when the "LED is always ON" setting is used.
- I have included an LED Color Tester to allow you to test your own phone's LED color display ability. Note: use the menu's "Current Settings" option to display which LED colors your phone supports that the app has auto-identified for you (scroll to the bottom in the "Miscellaneous" section). If your phone is not rooted, you'll have to suspend monitoring first and turn your screen off to see the results of your color test. If your phone is rooted and you've enabled the "LED is always ON" setting, you'll be able to see the results of your color test immediately while the screen is on.
- I've included an option "Locate Battery / LED Files" option to explicitly locate and display the battery state directory, LED notification directory, and supported LED colors. For non-Motorola Droid-class phones, this function is performed automatically after first install (and is not necessary (but harmless) for Motorola Droid-class phones).
PERMISSIONS
- BattMonX monitors for the receipt of SMS message notifications (android.permission.RECEIVE_SMS) for the purpose of stepping-aside when an SMS text arrives so that the SMS notification (i.e., blinking green LED) can be displayed. No actual SMS messages are read--the app only receives the SMS broadcast action.
- The app also receives a notification of when the phone has rebooted (android.permission.RECEIVE_BOOT_COMPLETED) for the purpose of restarting the battery state monitoring automatically after a reboot. You can enable or disable this feature in the menu (Preferences / Settings -> Set On Boot (checked or un-checked)).
- BattMonX uses the android.permission.WRITE_EXTERNAL_STORAGE to create a temporary file on the /sdcard containing the list of files in the /sys/devices/platform directory structure in order to automatically identify the battery state (status and capacity) and LED notification (<led-color>/brightness) files.
For screen shots and additional information, please visit https://sites.google.com/site/scaryalienware
Thanks again to everyone for their feedback and suggestions!
Please contact me at scary.alien@gmail.com is you have any issues, questions, comments, or suggestions. Cheers!
Screen Shots
QR code:
Additionally, for phones like the Droid X with a tri-color LED (red/green/blue), a variety of colors may be selected to differentiate the various battery states (OFF, red, green, blue, yellow, orange, deep sky blue, dark violet, dark green, and dark orange). Version 1.8 includes the color "amber" for those phones that support an amber LED indicator. Also, rooted Motorola Droid-class phones can choose "white" as a color option when used with the "LED is Always ON" experimental (and root-only) feature.
PHONE COMPATIBILITY
This app will not work on all phones. For example, the Samsung Vibrant and Captivate do not have LED indicators. Some phones only have a two-color LED (the HTC Eris and Evo 4G both have a green/amber LED; the Epic 4G supports a red/blue LED) which might allow for partial functionality from this app (especially if rooted). Additionally, its clear from testing that some phone's firmware interferes or does not fully implement the standard Android LED notification functionality identically to the Motorola Droid-class of phones.
Extensive logic has been added in version 1.7 and 1.8 in an attempt to support other phones. Version 1.8 now implements a strategy for dynamically finding a phone's battery state files (specifically the "status" and "capacity" files). Additionally, the LED notification directories are identified to determine their location and which color brightness files are supported by your phone's LED. Please contact me at scary.alien@gmail.com for instructions on how to provide debugging information so I can try to support your phone.
USAGE and NOTES
* Launch the BattMonX app and press the "Start Monitoring Battery Status" button. Monitoring will take place in the background and the app may be safely exited via the BACK or HOME keys.
* While monitoring is active/enabled, the app will check the battery state at a user-selectable polling interval and set the LED state as specified.
* To exit the BattMonX UI but continue monitoring, use the BACK or the HOME key--the app's service logic will continue monitoring the battery state in the background.
* To discontinue monitoring, recall or re-launch the app and press the "Stop Monitoring and Exit" button.
* Version 1.6 and higher now allows BattMonX to work alongside SMS text notifications. After viewing the text message or clearing the notification, BattMonX will resume battery state monitoring at the start of the next polling interval. Version 1.8 of the app implements a new strategy to make the app much more responsive (30 seconds or less) to SMS notifications.
* To have the app automatically monitor the battery state after a reboot, enable the "Set on Boot" option in the second menu page.
* Use the "Display Current Settings" menu item to see app's current state and settings.
* Use of the low-battery indicator is optional. If enabled however, it will take precedence over all other settings (i.e., as long as the current battery percentage full is less than or equal to the low-battery threshold, the low-battery action will be taken and used regardless of the other charging or discharging settings).
* This app does NOT require root; requires minimal permissions; uses very little CPU and system resources. Version 1.8 does include some new experimental features that require root such as the "LED Always On" feature to enable turning the LED on while the screen is on (not available on a stock Droid X).
* If you use a task killer, be sure to exclude the BattMonX app.
* You should also be aware that many phones turn OFF the LED when turning the screen on or off. The app should re-light the LED when/if appropriate at the top of the next polling interval. Additionally, Android will suspend non-system app processing when the screen is turned off. This might cause BattMonX to not be able to update the LED status while the screen is off since it (and all other apps) are not being given CPU cycles for processing. When the screen is turned back on or an SMS text message is received, the app should wake-up and resume updating the LED status as normal.
EXPERIMENTAL FEATURES
Version 1.8 brings some new experimental features to BattMonX:
- An "LED is always ON" (for rooted phones only) to light the LED while the screen is on (normally, at least for the Droid X) the LED is only display while the screen is off. This experimental feature bypasses the notification API and updates the LED notification's brightness files directly. If you use this feature with the set-on-boot option, be sure that you tell the SuperUser app to "remember" the "allow" setting so that the app will resume expected monitoring (otherwise, the app will automatically turn off the "LED is always ON" setting). Also, there is currently no "blink" functionality available when the "LED is always ON" setting is used.
- I have included an LED Color Tester to allow you to test your own phone's LED color display ability. Note: use the menu's "Current Settings" option to display which LED colors your phone supports that the app has auto-identified for you (scroll to the bottom in the "Miscellaneous" section). If your phone is not rooted, you'll have to suspend monitoring first and turn your screen off to see the results of your color test. If your phone is rooted and you've enabled the "LED is always ON" setting, you'll be able to see the results of your color test immediately while the screen is on.
- I've included an option "Locate Battery / LED Files" option to explicitly locate and display the battery state directory, LED notification directory, and supported LED colors. For non-Motorola Droid-class phones, this function is performed automatically after first install (and is not necessary (but harmless) for Motorola Droid-class phones).
PERMISSIONS
- BattMonX monitors for the receipt of SMS message notifications (android.permission.RECEIVE_SMS) for the purpose of stepping-aside when an SMS text arrives so that the SMS notification (i.e., blinking green LED) can be displayed. No actual SMS messages are read--the app only receives the SMS broadcast action.
- The app also receives a notification of when the phone has rebooted (android.permission.RECEIVE_BOOT_COMPLETED) for the purpose of restarting the battery state monitoring automatically after a reboot. You can enable or disable this feature in the menu (Preferences / Settings -> Set On Boot (checked or un-checked)).
- BattMonX uses the android.permission.WRITE_EXTERNAL_STORAGE to create a temporary file on the /sdcard containing the list of files in the /sys/devices/platform directory structure in order to automatically identify the battery state (status and capacity) and LED notification (<led-color>/brightness) files.
For screen shots and additional information, please visit https://sites.google.com/site/scaryalienware
Thanks again to everyone for their feedback and suggestions!
Please contact me at scary.alien@gmail.com is you have any issues, questions, comments, or suggestions. Cheers!
Screen Shots
QR code:
Last edited: