开发者

c# windows mobile battery %

I'm following this article on how to get the battery status on a windows mobile device:

http://msdn.microsoft.com/en-us/library/aa457088.aspx

This works well when the PDA is not being charged; the % returns matches what is seen on the power screen of the PDA.

However when the PDA is charging, the % returned is 100. i've also compared all the class member values when charging and not charging and can't see anything I 开发者_如何学运维could use in place of BatteryLifePercent.

I can use ACLineStatus or BatteryFlag to detect if charging, but it would be great to show the user something like "Charging.. 88%" so they know when the charge has reached 100%.

Has anyone come across this before ?

Apologies if my prior searching was inadequate and the answer is here somewhere.. please let me know.

Andrew


The result you're getting is what the battery driver is providing to the power manager. If it's giving you 100% when plugged in (many do) then that's all the info you can get (unless the device OEM added some sort of proprietary API to query it, which I'd doubt).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜