Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get battery level with 1 % accuracy in ios

Tags:

ios

battery

How to get battery level with 1 % accuracy .

       [UIDevice currentDevice].batteryLevel

Will give battery level with accuracy of 5%. But i recently used Battery Doctor App on my iphone 4S running ios 5.1, which is giving battery level with 1% accuracy . Anyone has any idea , how can we get that accuracy ... I have tried and searched a lot but not getting how they are calculating it .. Thanks in advance...

like image 504
Ankit Avatar asked Sep 10 '12 07:09

Ankit


People also ask

How do I make my iPhone battery percentage accurate?

Go to Settings > Battery, then turn on Battery Percentage. On an iPhone with Face ID, the battery percentage appears inside the battery symbol on the status bar. Tip: On iPhone models with Face ID, you can also swipe down from the top-right corner to quickly view the battery percentage in Control Center.

Can I get my iPhone battery health back to 100?

There's only one thing that you can do to keep your iPhone's battery health at 100%. Stop using your iPhone. Yup, the only way you're going to keep your iPhone's battery at 100% is to stop using it and charging it.

Is battery health on iPhone accurate?

Very accurate, basically the iPhone iOS software learns your usage habits and calculates an accurate battery health percentage by seeing how quickly the battery drains compared to how it was before. 82% battery health for a 4 year old iPhone looks very normal, that seems just about right.


2 Answers

Starting with iOS 8,

[UIDevice currentDevice].batteryLevel

provides 1% accuracy :)

like image 106
Nandan Sawant Avatar answered Nov 02 '22 05:11

Nandan Sawant


If you turn off Setting->General->Usage->Battery Percentage, Battery Doctor shows your battery level with %5 precision...So I guess that they are running some image recognition algorithm for the upper right corner of the device, where the battery percent is shown.

like image 22
ilarele Avatar answered Nov 02 '22 07:11

ilarele