Get battery recharge time

二次信任 提交于 2019-12-13 04:22:24

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!