1

I was asking how to find out the recharge time of the battery. There are several apps that can do this but I didn't find something except this How to find the battery recharge time of android mobile programatically?

Is there any new possibility except measure the time for 1 percentage and calculate it? If not how can I measure the time?

Community
  • 1
  • 1
Phil
  • 57
  • 8
  • see http://stackoverflow.com/questions/8923497/get-the-remaining-battery-time-available-from-an-android-phone (probably does not give much more info than what you already have) – Rémi Jul 21 '13 at 06:49
  • @Phil how u resolved your issue i m trying to follow accepted answer but if app installed first time and if it is not charging then how will i calculate time stamp difference of level from n to n+1 ? how u have done ? – Erum Jan 07 '15 at 06:32

1 Answers1

1

You can do it in a different way.But for the 1st time each phone that has installed your app it will need to charge from 1 percent to full.It will calculate time for each increment as 1,2,3..100 and record it in persistent storage.So whenever your app is run next time it will calculate charging time from battery`s present level to 100 percent and you are done. OR calculate 100 percent full charging time and divide that by 100 and calculate full charge time.

WSS
  • 503
  • 5
  • 20
  • 1
    The charge time varies. The main factor is the charger's mA rate (e.g. USB charger vs. wall charger). Measuring only once will give the value for that particular charger, but don't store that number and assume it will always be true. It may be better to monitor the value increases (from n% to n+1%), show the projected time and keep adjusting as you get more samples. This will also compensate for other factors, e.g. temperature, age of the device and so on. – Christian Garbin Jul 21 '13 at 15:27