Windows Phone 7.1 SDK Alarm

那年仲夏 提交于 2019-12-04 05:07:30

问题


I'm trying to create an alarm using the new Alarm class in the Windows Phone 7.1 SDK

I'm able to get it to work but the alarm doesn't seem to be going off at the time i've set.

Alarm alarm = new Alarm("MyAlarm")
        {
            Content = "Alarm!",
            BeginTime = DateTime.Now.AddSeconds(seconds),
        };
ScheduledActionService.Add(alarm);

回答1:


The remarks in MSDN say

The action will not be invoked before the begin time has been reached.

(emphasis mine)

There is no guarantee on the alarm being called at the exact second specified. I would expect there to be the possibility of the alarm being triggered up to a few seconds after the specified time, but not before.



来源:https://stackoverflow.com/questions/6657211/windows-phone-7-1-sdk-alarm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!