问题
Updating live tiles from Background audio agent?
I know that you can update Liva Tils with ShellTile of PeriodicTask. is it possible to update the live tiles of background audio agent?
I want to do, for example, when the track changed to the title track on the live tile. Is this possible?
Just did not want to do would have been a few applications of background agents: agent audio and even periodic background agent. Would not this heavy load and impact on battery life?
Update: BackgroundAudioPlayer tried in this way:
ShellTile apptile = ShellTile.ActiveTiles.First();
StandardTileData appTileData = new StandardTileData();
appTileData.Title = "Title App";
appTileData.Count = 5;
appTileData.BackgroundImage = new Uri("/front.png", UriKind.RelativeOrAbsolute);
apptile.Update(appTileData);
And I get an error message First()
is not found
回答1:
add using System.Linq
to the top of your file.
来源:https://stackoverflow.com/questions/8550858/updating-live-tiles-from-background-audio-agent