开发者

GPS Power on HTC Snap/Ozone Dash 3G

开发者 https://www.devze.com 2022-12-30 03:24 出处:网络
I\'m using an HTC Snap running WinMo 6.5 Standard and I have a seemingly simple requirement - when the device goes into \"BacklightOff\" power mode the application needs to continue to collect GPS loc

I'm using an HTC Snap running WinMo 6.5 Standard and I have a seemingly simple requirement - when the device goes into "BacklightOff" power mode the application needs to continue to collect GPS location data. By default the device shuts down the GPS receiver.

I've tried a boatlod of things to achieve this over开发者_如何学运维 the last 2 days. I've read the sparse info in the MSDN Forums. Nothing that woked for my device.

I've read Joel's CodeProject article and tried several things there including calling DevicePowerNotify, SetDevicePower and SetPowerRequirement. None of these had any effect.

I tried calling PowerPolicyNotify coupled with SystemIdleResetTimer to try to get it to just run in unattended mode. The device still does into low-power mode (yes, it's ignoring the SystemIdleTimerReset call, tried it from C# and C).

I tried modifying the power profiles in the registry. No effect before of after device reset.

I consider myself to be a least somewhat versed in writing apps for these things, but this one really has me up against the wall. Basically it seems that this specific phone is not using the CE power manager, but instead is doing it's own thing. Does anyone have any experience with this specific platform and trying to alter anything with it's power (or backlight) profiles? Any suggestions or thoughts based on experience?


So the answer ended up being that there really is no way to control it. In fact there appears to be littel standardization of the behavior of the power for peripherals from device to device (using a different HTC device it works just fine). In the end, I recommended that the client either find different hardware or move to a platform other than WinMo that has some standardization for this.


Looks like HTC has its own mind when it comes to power management. It does not care about the Joel Article nor the Windows Mobile recommendations.

I too have a HTC Touch Pro 2, and developing and testing GPS on this device ate up almost all my resources for about 3 weeks. Finally, I gave up and decided that the only way to solve the GPS problem was

  1. Use unattended mode for my program in C#.
  2. Set Device Power requirements from my program in C#
  3. Set the device not to suspend from the system settings. (it was not honoring Unattended mode, nor SystemIdleReset)

Conclusion: Watch out of consumer devices when developing applications that need to continue run on the background.

0

精彩评论

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