[APP][LESS BASIC] Transformer Battery Widget (V2.1.1 12/06/11)

Search This thread

Highland3r

Senior Member
Sep 27, 2009
464
153
*Disclaimer*
The widget is very much a "beta"/"test". It come's as is. If it doesn't work/does weird stuff I'll try and investigate but won't make any promises.
Happy to listen to feature/improvement requests but they may not ever be implemented.
I'm new to Android Development (although not to java/development as a whole) so this is a learning exercise for personal knowledge gain.
*Disclaimer*

Now the excuses are out of the way, widget is attached.
Should be a case of installing and the widget will then be available. Some people have reported a reboot is required before the widget is visible

Tested against a ROOTED version of Prime! V1.4, also works fine on stock 3.1
Not working with clemsyn-blades cusom kernel (Widget reports dock as unplugged. Looks like a kernel issue rather than a widget/app problem)
Tested up to version 3.2 with no issues. Also working on ics (galaxy nexus)
Source code can be made available if anyone wants a laugh.

Added Configurable text size and color in V2.1
Enter a valid color (List - red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,darkgray) in the first box
Enter a valid textsize in the second. 20 is about right (was the default for v1.3 of widget)
There's some basic validation added, if you get a force close on config it's likely you've entered something wrong.
Planning on beefing up validation & available config shortly.

Bj5ZAFC


Downloads
Version 1.3
White - http://db.tt/DhjaUEA
Black - http://db.tt/RcPWpjq

Version 2.1.1
http://db.tt/8vAFlAh

--------------------------------
Code:
ChangeLog:
V1.3 - Initial Release
V2.0.1 - Added Basic Size & Color config.
            Added Shadow to Text
            Small change to Widget Sizes
V2.1    - Internal Modifications.
V2.1.1  - Fixed issues with preferences being lost

The widget is based off code from the following two sources -

Modifications were required to get the dock readout to work properly.
http://android-er.blogspot.com/2010/10/home-screen-battery-widget.html
http://www.tutorialforandroid.com/2009/01/getting-battery-information-on-android.html
 
Last edited:

Mr.Clark

Senior Member
Feb 15, 2006
439
40
Awesome!

MoDaCo 3.1 ROM, I had to reboot after installing to get it to show up in the list of widgets, but it's there, it's resizable, it's really bloody useful!

Thanks!
 

gniouki

Senior Member
Apr 11, 2009
103
8
Le Chesnay
www.asuspad.fr
the command doesn't work

edit : ok I tried again and i get that :

# export PATH=/data/local/bin:$PATH
# logcat BatteryService:D *:S
--------- beginning of /dev/log/system
D/BatteryService( 149): level:100 scale:100 status:5 health:2 present:true dock_status:1 dock_level:0 voltage: 8 temperature: 278 technology: Li-ion AC powered:true USB powered:false icon:17302721 invalid charger:0
D/BatteryService( 149): level:100 scale:100 status:5 health:2 present:true dock_status:1 dock_level:0 voltage: 8 temperature: 279 technology: Li-ion AC powered:true USB powered:false icon:17302721 invalid charger:0
D/BatteryService( 149): level:100 scale:100 status:5 health:2 present:true dock_status:1 dock_level:0 voltage: 8 temperature: 280 technology: Li-ion AC powered:true USB powered:false icon:17302721 invalid charger:0
--------- beginning of /dev/log/main
D/BatteryService( 149): level:100 scale:100 status:5 health:2 present:true dock_status:1 dock_level:0 voltage: 8 temperature: 281 technology: Li-ion AC powered:true USB powered:false icon:17302721 invalid charger:0
 
Last edited:

makaveliq3

Senior Member
Aug 13, 2010
54
8
just installed with no issues! Looks like it's running great, thanks man that helps out a ton.
 

Highland3r

Senior Member
Sep 27, 2009
464
153
updated my post, juste quit an launch back terminal and it works

Ok looks like your dock status isn't being output in the BatteryService data. (dock_status:1 dock_level:0 should be the status and battery % for the dock)

Can you confirm the dock is seated correctly etc and is being registered properly by the tablet?
Don't have access to mine at the moment to check other entries in LogCat but try the below and see what it produces (again run via terminal)

Code:
logcat DockManagerService:D *:S
 

gniouki

Senior Member
Apr 11, 2009
103
8
Le Chesnay
www.asuspad.fr
The tablet is perflectly engadged in the keyboard and it does functon as it has to works, no problem this way.

Logcat says that :

# export PATH=/data/local/bin:$PATH
# logcat DockManagerService:D *:S
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
D/DockManagerService( 149): Display mobile dock notificaiton, level:0 status:1
D/DockManagerService( 149): Display mobile dock notificaiton, level:0 status:1
 

Highland3r

Senior Member
Sep 27, 2009
464
153
The tablet is perflectly engadged in the keyboard and it does functon as it has to works, no problem this way.

Logcat says that :

Ok, looks like (for whatever reason) the additional dock data isn't being provided. Could be kernel related - try flashing back to stock and see if that resolves it.
 

nkhdk

Member
Apr 20, 2010
6
0
Copenhagen
Thanks a lot for this! I don't like being left in the dark about how the dock battery is doing, and was quite surprised Asus didn't include the battery info in the latest fw.

This is just perfect, small and does exactly what it's supposed to do :)

(running stock 3.1 on a WW TF101 with a UK keyboard dock)
 

Highland3r

Senior Member
Sep 27, 2009
464
153
That's ok, with original kernel i've got informations !

Thanks for this amazing job

Thanks for the update - that's interesting to know. Glad you got it working - even if it did require a kernel change.

<edit>Thinking about it a bit more the Clemsyn kernel may not be based off the Transformer Source which might be the cause. Will have a look see if there's anything obvious which could help. </edit>
 
Last edited:

tornadog

Senior Member
Feb 21, 2008
287
10
thanks for this awesome widget. Now I know my dock is draining charge like crazy. was fully charged last night(solid green light on dock), and it was idle till about 1 hour back. Now it says dock is at 3% and my tablet at 92%
 

Top Liked Posts

  • There are no posts matching your filters.
  • 37
    *Disclaimer*
    The widget is very much a "beta"/"test". It come's as is. If it doesn't work/does weird stuff I'll try and investigate but won't make any promises.
    Happy to listen to feature/improvement requests but they may not ever be implemented.
    I'm new to Android Development (although not to java/development as a whole) so this is a learning exercise for personal knowledge gain.
    *Disclaimer*

    Now the excuses are out of the way, widget is attached.
    Should be a case of installing and the widget will then be available. Some people have reported a reboot is required before the widget is visible

    Tested against a ROOTED version of Prime! V1.4, also works fine on stock 3.1
    Not working with clemsyn-blades cusom kernel (Widget reports dock as unplugged. Looks like a kernel issue rather than a widget/app problem)
    Tested up to version 3.2 with no issues. Also working on ics (galaxy nexus)
    Source code can be made available if anyone wants a laugh.

    Added Configurable text size and color in V2.1
    Enter a valid color (List - red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,darkgray) in the first box
    Enter a valid textsize in the second. 20 is about right (was the default for v1.3 of widget)
    There's some basic validation added, if you get a force close on config it's likely you've entered something wrong.
    Planning on beefing up validation & available config shortly.

    Bj5ZAFC


    Downloads
    Version 1.3
    White - http://db.tt/DhjaUEA
    Black - http://db.tt/RcPWpjq

    Version 2.1.1
    http://db.tt/8vAFlAh

    --------------------------------
    Code:
    ChangeLog:
    V1.3 - Initial Release
    V2.0.1 - Added Basic Size & Color config.
                Added Shadow to Text
                Small change to Widget Sizes
    V2.1    - Internal Modifications.
    V2.1.1  - Fixed issues with preferences being lost

    The widget is based off code from the following two sources -

    Modifications were required to get the dock readout to work properly.
    http://android-er.blogspot.com/2010/10/home-screen-battery-widget.html
    http://www.tutorialforandroid.com/2009/01/getting-battery-information-on-android.html
    5
    Try this:

    https://dl.dropbox.com/u/17085235/TransformerBatteryWidget2.1.1.apk

    If the OP has an issue with me re-posting this, let me know and I'll remove it.
    1
    Seems to work on stock UK 3.1 just fine.
    1
    Works great on stock 3.1!

    I'd just add one single small request, would it be possible to do a black version as well for lighter wallpapers, or to let me know what I can edit to do it myself?

    Kind Regards,
    D4rKlar

    Black version added to OP.
    Installed fine straight over the top of the white version for me :)
    1
    Try this:

    https://dl.dropbox.com/u/17085235/TransformerBatteryWidget2.1.1.apk

    If the OP has an issue with me re-posting this, let me know and I'll remove it.


    Thank you, keep forgetting to redo tthe links.

    Not actively developing this anymore, but will try and slack less and keep the links active.