Updating live tiles from Background audio agent?

我怕爱的太早我们不能终老 提交于 2019-12-13 15:02:33

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!