定时器在锁定屏幕下运行? [英] Timer run under lock screen?

查看:105
本文介绍了定时器在锁定屏幕下运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,在我的应用中,用户可以设置一段时间(例如30分钟),并在我的应用需要播放声音(闹钟)时结束。  我似乎无法在锁定屏幕下进行此操作。  用户将设置一个时间并且
然后不再与手机交互,导致锁定屏幕,然后计时器将永远不会关闭并且警报声将永远不会播放。  

Hello, in my app the user will be able to set an amount of time (e.g. 30 minutes) and at the end of the time my app needs to play a sound (an alarm).  I cannot seem to make this work under the lock screen however.  The user will set a time and then not interact with the phone anymore, resulting in the lock screen, and then the timer will never go off and the alarm sound will never play.  

满足此类要求的最佳架构是什么?

What is the best architecture to accommodate this sort of requirement?

Karl

推荐答案

Windows Phone对第三方计时器应用程序的选项有限。 用户启动另一个应用后,您的应用就会被取消。

Windows Phone has limited options for third party timer apps.  As soon as the user starts another app, your app is canceled.

1。无法根据计时器事件启动您的应用。

1. There is no way to launch your app based on timer events.

2。您可以安排警报/提醒。点击提醒即可打开您的应用:

http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler(v=vs.92).aspx



2. You can schedule alarms/reminders. Tapping on a reminder can open your app: http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler(v=vs.92).aspx

3。屏幕锁定时无法显示您的应用。

3. You cannot show your app when the screen is locked.

4。但您可以定期更新锁定屏幕图像和/或显示通知:
$
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj571206(v = vs.105).aspx

4. But you can periodically update the lock screen image and/or show notifications:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj571206(v=vs.105).aspx

希望这有帮助,

马克

Hope this helps,
Mark

 

 

 


这篇关于定时器在锁定屏幕下运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆