HTC Snap/Ozone Dash 3G 上的 GPS 电源

发布于 2024-08-31 19:36:01 字数 1180 浏览 10 评论 0原文

我正在使用运行 WinMo 6.5 标准的 HTC Snap,并且我有一个看似简单的要求 - 当设备进入“BacklightOff”电源模式时,应用程序需要继续收集 GPS 位置数据。默认情况下,设备关闭 GPS 接收器。

在过去的两天里,我尝试了很多方法来实现这一目标。我已阅读 稀疏 信息 在 MSDN 论坛中。没有任何东西唤醒我的设备。

我读过 Joel 的 CodeProject 文章 并尝试了一些方法,包括调用 DevicePowerNotify, SetDevicePower 和 SetPowerRequirement。这些都没有任何效果。

我尝试调用 PowerPolicyNotify 以及 SystemIdleResetTimer 来尝试将其设置为以无人值守模式运行。设备仍然进入低功耗模式(是的,它忽略了 SystemIdleTimerReset 调用,从 C# 和 C 尝试过)。

我尝试修改注册表中的电源配置文件。设备重置之前或之后没有影响。

我认为自己至少在某种程度上精通为这些事情编写应用程序,但这确实让我陷入了困境。基本上,这款特定的手机似乎没有使用 CE 电源管理器,而是在做它自己的事情。有谁对这个特定平台有任何经验,并尝试用它的电源(或背光)配置文件改变任何东西?根据经验有什么建议或想法吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

深府石板幽径 2024-09-07 19:36:01

所以最终的答案是,确实没有办法控制它。事实上,不同设备之间的外设电源行为似乎没有什么标准化(使用不同的 HTC 设备,它工作得很好)。最后,我建议客户要么寻找不同的硬件,要么迁移到 WinMo 以外的对此有一定标准化的平台。

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.

夜无邪 2024-09-07 19:36:01

看来HTC在电源管理方面有自己的想法。它不关心 Joel 文章或 Windows Mobile 建议。

我也有一台 HTC Touch Pro 2,在这台设备上开发和测试 GPS 几乎耗尽了我大约 3 周的所有资源。最后,我放弃了,并决定解决 GPS 问题的唯一方法是

  1. 在我的 C# 程序中使用无人值守模式。
  2. 从我的 C# 程序中设置设备电源要求
  3. 将设备设置为不从系统设置挂起。 (它不支持无人值守模式,也不支持 SystemIdleReset)

结论:在开发需要继续在后台运行的应用程序时,请注意消费类设备。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文