0

I am developing an iOS app, In which I need to calculate the estimated time required for charging the battery. I need to display like "Estimated time to get completely charged in 1:30 minutes".

I googled on this, but they all are displaying only current battery charging level.

Rakesh
  • 1,177
  • 1
  • 15
  • 31

1 Answers1

0

This seems like it is different for every phone, so one solution could be to start it at some constant rate. So basically every time a phone shows 40% you say that is 2 hours and just decrease it proportionally as it grows. One cool thing you could do would be to log battery and time/date stamps during charge and take an average of those rates to get a more accurate time till fully charged.

Example is when the app is running, log battery and time, every 5 minutes. Save this data and formulate the avg

Patrick Wilson
  • 293
  • 1
  • 2
  • 10