Hi.
I am creating a ShellToast class in OnInvoke() of ScheduledToast Class from ScheduledToastAgent project type as below.
ShellToast toast = new ShellToast();
toast.Content = "Hello App.."
toast.Title = "My App:";
toast.Show();
#if DEBUG_AGENT
ScheduledActionService.LaunchForTest(task.Name, TimeSpan.FromSeconds(15));
#endif
Now i have added this in other phone app project in mainpage.xaml.cs below the
IntializeComponent()
PeriodicTask task;
task = ScheduledActionService.Find("ScheduledAgent") as PeriodicTask;
bool found = (task != null);
if (!found)
{
task = new PeriodicTask("ScheduledAgent");
}
task.Description = "Test app";
task.ExpirationTime = DateTime.Now.AddDays(1);
if (!found)
ScheduledActionService.Add(task);
else
{
ScheduledActionService.Remove(task.Name);
ScheduledActionService.Add(task);
}
#if DEBUG_AGENT
ScheduledActionService.LaunchForTest(task.Name, TimeSpan.FromSeconds(15));
#endif
Now Please help me below:
1) As i mentioned 15 seconds time to test the app, toast is not coming for every 15 seconds. Why?
2) Where i need to add this ScheduledActoinService.Add() to get the toast for every 15 seconds in the application like in the App.xaml.cs or mainpage.xaml.cs.?
Please help me in seeing toast at regular interval of time...
Thank you.. :-)