开发者

Reminder alarm after BeginTime

I 开发者_开发问答want to use the WP7.1 Reminder class, and the alarm of the reminder should start in a specified amount of time (in seconds or minutes) from now. This is part of my coding:

Reminder reminder = new Reminder(name);
reminder.Title = "foo";
reminder.BeginTime = now.AddSeconds(5.0);
reminder.ExpirationTime = now.AddSeconds(7.0);
reminder.Content = "sdfsd";
ScheduledActionService.Add(reminder);

The reminder comes up, but not at the specified point in time (usually several seconds later). I could only test it on the emulator though, is the behavior on the device different? Or isn't the Reminder class supposed to be used on such a fine granular basis (seconds), but only on minutes/hours/days?


MSDN documentation says (emphasis mine):ScheduledAction.BeginTime property

The action will not be invoked before the begin time has been reached. The time value should be in the device’s local time.

This issue was also covered in another thread here.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜