开发者

Retrieve battery uptime for android

开发者 https://www.devze.com 2023-01-07 06:56 出处:网络
Is there a way to retrieve the the amount of time since the battery has been charge开发者_运维百科d?

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

精彩评论

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