问题
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?
回答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.
来源:https://stackoverflow.com/questions/17769775/get-battery-recharge-time