Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP Highland3r

6th June 2011, 11:01 AM   |  #1  
OP Senior Member
Thanks Meter: 72
 
387 posts
Join Date:Joined: Sep 2009
More
*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.



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/...ry-widget.html
http://www.tutorialforandroid.com/20...n-android.html
Last edited by Highland3r; 20th November 2011 at 10:56 AM. Reason: add ics compatibility info
The Following 37 Users Say Thank You to Highland3r For This Useful Post: [ View ]
6th June 2011, 12:29 PM   |  #2  
Senior Member
Thanks Meter: 13
 
314 posts
Join Date:Joined: Sep 2005
Seems to work on stock UK 3.1 just fine.
The Following User Says Thank You to rilot For This Useful Post: [ View ]
6th June 2011, 01:27 PM   |  #3  
Mr.Clark's Avatar
Senior Member
Thanks Meter: 40
 
438 posts
Join Date:Joined: Feb 2006
More
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!
6th June 2011, 02:58 PM   |  #4  
Senior Member
Thanks Meter: 17
 
133 posts
Join Date:Joined: Nov 2010
Thumbs up
Great app! Resizeable at that! Makes you wonder why Asus took the feature out of the beta firmware that was released prior to the one that fixed the dock issues.

Thanks much Highland3r
6th June 2011, 03:34 PM   |  #5  
Senior Member
Flag Le Chesnay
Thanks Meter: 8
 
102 posts
Join Date:Joined: Apr 2009
More
Using primordial 3.1 and clemsyn-blades kernel it shows "detached" for the dock
6th June 2011, 03:38 PM   |  #6  
OP Senior Member
Thanks Meter: 72
 
387 posts
Join Date:Joined: Sep 2009
More
Quote:
Originally Posted by gniouki

Using primordial 3.1 and clemsyn-blades kernel it shows "detached" for the dock

Open terminal on your tablet and paste the following command:

Code:
logcat BatteryService:D *:S
Paste the output (or a few lines of it) back here.
6th June 2011, 03:50 PM   |  #7  
Senior Member
Flag Le Chesnay
Thanks Meter: 8
 
102 posts
Join Date:Joined: Apr 2009
More
the command doesn't work

edit : ok I tried again and i get that :

Quote:

# export PATH=/data/local/bin:$PATH
# logcat BatteryService *: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 by gniouki; 6th June 2011 at 03:55 PM.
6th June 2011, 03:51 PM   |  #8  
OP Senior Member
Thanks Meter: 72
 
387 posts
Join Date:Joined: Sep 2009
More
Quote:
Originally Posted by gniouki

the command doesn't work

Do you get any errors? What's the output when you attempt to run the command?
6th June 2011, 03:59 PM   |  #9  
Member
Thanks Meter: 8
 
54 posts
Join Date:Joined: Aug 2010
just installed with no issues! Looks like it's running great, thanks man that helps out a ton.
6th June 2011, 04:00 PM   |  #10  
Senior Member
Flag Le Chesnay
Thanks Meter: 8
 
102 posts
Join Date:Joined: Apr 2009
More
updated my post, juste quit an launch back terminal and it works

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

Advanced Search
Display Modes