在 Windows Phone 7 上锁定运行的计时器应用程序
根据当前的Windows Phone 7 应用程序认证要求 (pdf) 在锁定状态下运行的应用程序必须“停止任何...活动计时器”(第 6.3.1 节)。然而,在 Marketplace 上,有许多计时器/秒表应用程序声称可以在锁定下运行,并且还允许在其设置中禁用锁定。这些应用程序是如何经过认证的,或者如果应用程序允许用户做出决定,那么 Microsoft 是否会放松一些限制?
此外,其中一些应用程序还建议即使应用程序退出或设备关闭时它们也会继续运行。在这些情况下,它们是否没有真正运行,即计时器要么从重新激活时停止的地方开始,要么使用操作系统时间来计算逻辑删除和重新激活之间经过的时间?在这些情况下,我还认为应用程序不可能在计时器完成时通知用户?
Under the current Windows Phone 7 Application Certification Requirements (pdf) applications running under lock must "stop any ... active timers" (section 6.3.1). However looking out on Marketplace there are a number of timer/stopwatch apps claiming to run under lock and also allow lock to be disabled in their settings. How are these apps certified or is there some loosening on the restrictions by Microsoft if the app allows the user to make that decision?
Also some of these apps also suggest they continue even when the app is exited or when the device off. Is it the case that they are not truly running under these circumstances, i.e. the timers either start where they left off when reactivated, or perhaps use the OS time to work out the time elapsed between tombstoning and reactivation? In these circumstance I also presume it is not possible for the app to notify the user when the timer completes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
6.3.1 要求应用程序提供阻止应用程序在锁定屏幕下运行的功能。
通过禁用 ApplicationIdleDetectionMode。
您可以在设备关闭时使用您记下的操作系统时间来跟踪时间。 Peter Torr 在他的 WPH305 Tech Ed 2010 Talk 中用逻辑删除状态演示了这一点。请参阅第 28 分钟。
您认为无法在计时器上使用客户端 API 通知用户是正确的。最接近这一点的是通知,它需要网络通信并假定连接。
6.3.1 requires apps to offer the ability to prevent the app from running under a lock screen.
Apps can run under a lock screen by disabling ApplicationIdleDetectionMode.
You can keep track of time while the device is off using the OS time as you note. Peter Torr demoed this with tombstoning state in his WPH305 Tech Ed 2010 Talk.. refer 28 minutes in.
You presume correct that there is no ability to notify the user using client APIs on a timer. The closest you'll get to this is notifications which entails network communication and presumes connectivity.