Windows Phone Multitasking (Part 2/2)

MK Mobile UG

MK Mobile UG
Macedonian Mobile Development User Group

Windows Phone Multitasking (Part 2/2)

  • Comments 3

ScheduledNotifications

The both ScheduledNotification classes (Alarm and Reminder) inherit from the base classes ScheduledNotification and ScheduledAction. The difference is that when we want to send contextual information to the application that created the notification we should use Reminder, on the other hand if we need to play some notification sound we should use the Alarm.

 

Alarm Properties

BeginTime

Gets or sets the time at which the action’s schedule begin.

Content

Gets or sets the text content that is presented to the user.

ExpirationTime

Gets or sets the time at which the action’s schedule expires.

IsEnabled

Gets the enabled status of the action.

IsScheduled

Gets the scheduled status of the action.

Name

Gets the name of the scheduled action.

RecurrenceType

Gets or sets the recurrence type for a notification.

Sound

Gets or sets the sound that is played when the alarm is launched.

Title

This property is not supported in the current version

 

Microsoft.Phone.Scheduler.Alarm;

Alarm alarm = new Alarm("TaskUniqueName");

alarm.BeginTime = DateTime.Now.AddSeconds(5);

alarm.Content = "My Alarm Content";

alarm.ExpirationTime = DateTime.Now.AddSeconds(10);           

alarm.RecurrenceType = RecurrenceInterval.None;

alarm.Sound = new Uri("FilePath", UriKind.RelativeOrAbsolute);

ScheduledActionService.Add(alarm);

 

 

Reminder Properties

BeginTime

Gets or sets the time at which the action’s schedule begin.

Content

Gets or sets the text content that is presented to the user.

ExpirationTime

Gets or sets the time at which the action’s schedule expires.

IsEnabled

Gets the enabled status of the action.

IsScheduled

Gets the scheduled status of the action.

Name

Gets the name of the scheduled action.

NavigationUri

Gets or sets the navigation Uri that is passed to the application when it is launched from the reminder

RecurrenceType

Gets or sets the recurrence type for a notification.

Title

This property is not supported in the current version

 

 

Microsoft.Phone.Scheduler.Reminder;

Reminder reminder = new Reminder("TaskUniqueName");

reminder.BeginTime = DateTime.Now.AddSeconds(5);

reminder.Content = "My Reminder Content";

reminder.ExpirationTime = DateTime.Now.AddSeconds(10);

reminder.RecurrenceType = RecurrenceInterval.None;

reminder.NavigationUri = new Uri("/MainPage.xaml", UriKind.RelativeOrAbsolute);

reminder.Title = "My Reminder Title";

ScheduledActionService.Add(reminder);

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Nice... Keep it up! :)

  • Thanks :)

  • Thanks...it would be helpful...:)