Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,737,799 Members 48,242 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
Highland3r
Old
(Last edited by Highland3r; 20th November 2011 at 09:56 AM.) Reason: add ics compatibility info
#1  
Senior Member - OP
Thanks Meter 72
Posts: 387
Join Date: Sep 2009
Default [APP][LESS BASIC] Transformer Battery Widget (V2.1.1 12/06/11)

*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:
Select 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
Nexus 5, Galaxy Nexus, Nexus 4 (Wifes), Nexus 7 (2013)

Ex: Nexus One, Nexus S, Nexus 7
The Following 37 Users Say Thank You to Highland3r For This Useful Post: [ Click to Expand ]
 
rilot
Old
#2  
Senior Member
Thanks Meter 13
Posts: 314
Join Date: Sep 2005
Seems to work on stock UK 3.1 just fine.
Surface RT, Note 2
iPad3, iPhone 4S
The Following User Says Thank You to rilot For This Useful Post: [ Click to Expand ]
 
Mr.Clark
Old
#3  
Mr.Clark's Avatar
Senior Member
Thanks Meter 40
Posts: 437
Join Date: Feb 2006
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!
 
mb2k
Old
#4  
Senior Member
Thanks Meter 17
Posts: 133
Join Date: Nov 2010
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
 
gniouki
Old
#5  
Senior Member
Thanks Meter 8
Posts: 102
Join Date: Apr 2009
Location: Le Chesnay
Using primordial 3.1 and clemsyn-blades kernel it shows "detached" for the dock
 
Highland3r
Old
#6  
Senior Member - OP
Thanks Meter 72
Posts: 387
Join Date: Sep 2009
Quote:
Originally Posted by gniouki View Post
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:
Select Code
logcat BatteryService:D *:S
Paste the output (or a few lines of it) back here.
Nexus 5, Galaxy Nexus, Nexus 4 (Wifes), Nexus 7 (2013)

Ex: Nexus One, Nexus S, Nexus 7
 
gniouki
Old
(Last edited by gniouki; 6th June 2011 at 02:55 PM.)
#7  
Senior Member
Thanks Meter 8
Posts: 102
Join Date: Apr 2009
Location: Le Chesnay
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
 
Highland3r
Old
#8  
Senior Member - OP
Thanks Meter 72
Posts: 387
Join Date: Sep 2009
Quote:
Originally Posted by gniouki View Post
the command doesn't work
Do you get any errors? What's the output when you attempt to run the command?
Nexus 5, Galaxy Nexus, Nexus 4 (Wifes), Nexus 7 (2013)

Ex: Nexus One, Nexus S, Nexus 7
 
makaveliq3
Old
#9  
Member
Thanks Meter 8
Posts: 54
Join Date: Aug 2010
just installed with no issues! Looks like it's running great, thanks man that helps out a ton.
 
gniouki
Old
#10  
Senior Member
Thanks Meter 8
Posts: 102
Join Date: Apr 2009
Location: Le Chesnay
updated my post, juste quit an launch back terminal and it works

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes