开发者

Retrieve battery uptime for android

Is there a way to retrieve the the amount of time since the battery has been charge开发者_运维百科d?

It doesn't appear like there is a way to do so with BatteryManager, but they show it to you in the settings. I see it here source , but it doesn't appear like there is a way to grab it. Any help?


You can setup a broadcast receiver for ACTION_POWER_DISCONNECTED, and keep track of the last time it was broadcast.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜