JosePen

Hi all,

I know about the function to retrieve the GetSystemPowerStatus() using pinvoke function to retrieve the status of the current battery level, as low, high, etc. In the same way the Compact framework provides a class to perform this operations called SystemState.PowerBatteryStrength.

Is there any way to query the Windows Mobile 5 to ask about if there any battery backup installed on the device using the pinvoke methodology, or even better using manage classes inside of the compact frameworkv 2.0

Thanks in advance.

jpena@isthmusit.com

IsthmusIT Costa Rica Inc




Re: .NET Compact Framework Battery Backup

JosePen

is there any way to know from compact framework, if a smartphone has a backup battery, maybe query windows mobile using pinkove, something like that

Thanks in advance.

jpena@isthmusit.com






Re: .NET Compact Framework Battery Backup

Ilya Tumanov

I've never heard of backup batteries in WM SP (or PPC for that matter). For PPC prior to WM 5.0 devices had volatile RAM based storage which was battery powered. There usually was a back up capacitor which would allow you to replace main (and only) battery. Do you have an example of a device with such battery






Re: .NET Compact Framework Battery Backup

JosePen

Well actually I'm working right nowm with the Recon TDS, where is available info in www.tdsway.com, and for example this device, has a backup battery, which, provides the backup power when the primary battery is empty, or something like that.

Really the backup battery, no all devices have it, for example I'm work for multimedia matter with the Palm TREo, w750, which has Windows Mobile 5, camera, etc, and this smartphone does not have, a backup battery source. But the Recon does.

I'm was wondering of there is any way to query the native S.O. to ask about the possible presence of it, like using pinvoke . I perform an action, when the power is comming down, and if the device has a backup battery at least we have more time. I do not think it is a very hard issues, but I hope find something.

Regards,






Re: .NET Compact Framework Battery Backup

Ilya Tumanov

It's not really a backup battery on that device, it's an extra battery. Whatever you can detect it or not depends on how OEM implemented it. Say, you can get a car battery and plug it via some adapter into normal external power inlet on device. So technically it¡¯s a battery but device would think it¡¯s running on mains power. It's not that farfetched, there are several external laptop batteries like that. You should contact OEM and ask them if that extra battery can be checked upon via standard power APIs.

However I would say you don¡¯t need to worry about that as extra battery would likely to kick in on its own. If power is coming down that likely means both main and extra batteries are empty.






Re: .NET Compact Framework Battery Backup

ChunSheng Tang - MSFT

Hi, Josepen

Yes, there is a SystemState.PowerBatteryBackupState which will have the value of BatteryState.NotPresent if there isn't a backup battery.

Code Snippet
if (SystemState.PowerBatteryBackupState == BatteryState.NotPresent)
{
//Backup battery does not exist.
}

Regards

Tang






Re: .NET Compact Framework Battery Backup

JosePen

Thanks to all, the information its very useful.

Regards,






Re: .NET Compact Framework Battery Backup

KoolKapoor

hi all,

I tried using the same GetSystemPowerStatus() API for obtaining the battery info.

I got the other parameters, but for Battery full life time and Battery Full life time Percentage.

Please help me with this.

Thnx in adv.

Tc & Keep smiling.