I'd to update the image on a Windows Phone 8 live tile when the user clicks on it. I don't want to open the application's window just update the tile.
Can this be done? If so how?
I'd to update the image on a Windows Phone 8 live tile when the user clicks on it. I don't want to open the application's window just update the tile.
Can this be done? If so how?
You can associate a parameter to your tile
ShellTile.Create(new Uri("/ChangeTileOnlyPage.xaml?Change=1", UriKind.Relative), myShellTileData, true /*==supportsWideTile*/);
and evaluate this parameter in your ChangeTileOnlyPage:
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
string parameterValue = NavigationContext.QueryString["Change"]; //or similar
//do something with it ...
//update tile
//close app again
}
You can close your app again like in: How to exit or quit my Windows Phone 8 app programmatically?
Downside of this approach is, that your app is started (but directly closed again) and the user can't really "start" your app by clicking on the tile.
Another possibility would be through a BackgroundTask, like already mentioned.
To Update Live tile you can do that though your application exectution or from backgroundservice .
so I think you can not do that.