I have a Windows Phone 7 application that currently uses Live Tile Schedules to update.
The new version of the app uses a background task to update the tiles.
However after upgrading the app on a phone, if a tile schedule is already running on the main tile it doesn't stop updating.
I need to stop the tile schedule if it is running.
Creating a new schedule and stopping it doesn't work:
var t = new ShellTileSchedule()
{
MaxUpdateCount = 1,
Recurrence = UpdateRecurrence.Onetime,
StartTime = DateTime.Now,
RemoteImageUri = new Uri("http://mysite.com/livetile.png"),
};
t.Start();
t.Stop();
Creating a new schedule on the main tile in Active Tiles doesn't work:
ShellTile mainTile = ShellTile.ActiveTiles.FirstOrDefault();
t = new ShellTileSchedule(mainTile)
{
MaxUpdateCount = 1,
Recurrence = UpdateRecurrence.Onetime,
StartTime = DateTime.Now,
RemoteImageUri = new Uri("http://mysite.com/livetile.png")
};
t.Start();
t.Stop();