[Q] get battery percentage - Android Software Development

I've been trying to find how to get the percentage of the battery for a while but I cant get any of the tutorials to work. Whats the simplest way to get the current battery percentage?
Thanks in advance

Related

Battery percentage does not tally with the status bar's icon

what i mean is, i'll see the battery logo up on the status bar at 75% (3/4 bar) and think that i have ~75% amount of battery usage left.
i'll then check the battery numbers in the settings and my battery is at ~40% lol.
well i'm running a jm5 stock rom, rooted. anyone having that issue?
i'll try to run the battery low till it offs and monitor the values again.
Jup, I also noticed this, but no biggie, I think this is Android standard.
Definitely NOT defective IMHO.
If you feel frustrated by this use this little app: Battery Indicator
ye i'm using that, i was just wondering which numbers are at fault there. lol. oh well. such paradox in my status bar. thanks for the quick reply.
Adevem said:
what i mean is, i'll see the battery logo up on the status bar at 75% (3/4 bar) and think that i have ~75% amount of battery usage left.
i'll then check the battery numbers in the settings and my battery is at ~40% lol.
well i'm running a jm5 stock rom, rooted. anyone having that issue?
i'll try to run the battery low till it offs and monitor the values again.
Click to expand...
Click to collapse
The way I believe it works, and I might have the percentages slightly wrong is, especially the way they get rounded:
Actual/Graph
>79%/100%
50-79%/75%
25-49%/50%
>25%/25%
So, yes, you are always getting a readout that isn't very telling and is a step-gradual reading. The time you have the most information is right around, if/when you see a change. Other than that it can be barely more telling than a sundial .
Wrong info is in the notification bar (graphic battery). I've noticed the change upgrading to JM5 from JG5. Downgrading back to JG5 reverses the situation, which means the change is in framework-res.apk.
It is a change Samsung obviously did on purpose, but I wouldn't know why they settled for the worse...
Sent from my GT-I9000 using XDA App
well imma try flashing to jpjg8 after my songs are done transferring. gonna check that firmware out...

[Q] Battery Life Doesnt show correctly

im runnin Elegancia GTX by Miri & Steve - WM 6.5.X - V 2.0 FINAL and this version of android http://gamesquare.co.uk/froyo.html (original Froyo ROM)
the battery icon shows the ! as if its at 10% or less and the lock screens reads to connect to charger. the phone can be fully charged and it says this. ive also tested on different battery life percentages before booting and i still get the same icon.
i want to boot in android for most of the time but i also dont wanna be surprised when my phone dies becuz i cant see the battery life correctly
when i look in SETTINGS>ABOUT PHONE>STATUS
the battery life doesnt show a value
maybe i need to rephrase
my battery indicator doesn't show battery life, if anyone knows a thread that has the answer or knows how to fix please help me
again this issue happens once I've launched android, the battery status will always read as if the battery were low

[Q] Battery Charge Status

Hopefully this is a stupidly quick question to answer. In settings-about phone-battery on my wife's evo, it shows the battery charge status. However on the epic, I just have the "Battery use". Anyone know where I can find how much charge I have left? The icon on the notification bar is far from precise.

[Q] Question about the Battery

Hey folks,
I got a question about the battery life of the Defy......when my phone is discharging it jumps from 62% to 50% and from 33 to 19%.
Is this a sign that the battery isn´t working properly ? So maybe I need a new one ?
Hope someone can help me.....
I also tried different roms and everytime I get this "problem".
Best Regards
If you switch between the ROM and does not at least 1 o 2 charge-discharge cycle, the battery will not calibrate...
Try calibrate with die hard battery calibrator when your charging the phone : http://forum.xda-developers.com/showpost.php?p=18703418&postcount=5021
this didnt change anything
still the drops:crying:
same here, I think my battery might be broken, will buy a new one next week. I will post if its ROM issue or my battery was damaged
would be fantastic if you could give me a short note:good:
Well, I've the same issue with 2 different ROM and 2 different batteries (the original and a new one which I buyed few weeks)...
weird....so nobody know how to solve this problem
bought a new battery today....let´s see
GeForce06 said:
weird....so nobody know how to solve this problem
bought a new battery today....let´s see
Click to expand...
Click to collapse
At default the phone received information from the batt by division of 10% and the software estimate the discharge. For some reason this estimation is eronate and the new batt value determine the system to recalculate the discharge and make those abrupt value. Anyway you can find in "general" thread a topic which resolve that situation.

[Q] Lollipop battery stats revert to old one?

Hi there, i dont like lollipop battery stats.. It shows only remaining time.. Ad i want know current uptime.. So is there any app or way to make it like kitkat? That it shows how much phone uptime is..
Thanks..
I'm looking for something like that too.
Vihru said:
Hi there, i dont like lollipop battery stats.. It shows only remaining time.. Ad i want know current uptime.. So is there any app or way to make it like kitkat? That it shows how much phone uptime is..
Thanks..
Click to expand...
Click to collapse
Battery stats on mine show both, percentage and approximate time remaining above the graph and time in use since last charge below the graph
ag4751 said:
Battery stats on mine show both, percentage and approximate time remaining above the graph and time in use since last charge below the graph
Click to expand...
Click to collapse
now lollipop shows "uptime" too so its not problem anymore!

Categories

Resources