I have this little code here that is executed in my ScheduledTaskAgent
of my Windows Phone app, if this code is executed then there is some data to show.
I have made an comparison before this code and I executes only if there is new data.
Now I have no clue how to add each time the live tile update +1 (one) int to the Count of the FlipTile
I use. this is my code:
ShellTile appTile = ShellTile.ActiveTiles.First();
if (appTile != null)
{
FlipTileData TileData = new FlipTileData()
{
Title = "",
BackTitle = "my App",
BackContent = title.Collection.ElementAt(0).Title.ToString(),
WideBackContent = title.Collection.ElementAt(0).Title.ToString(),
Count = , //?????
};
appTile.Update(TileData);
How can I make the count every time counts one more if this code is executed?
I have really no clue. I tried with +1 but its an int and it doesnt give this +1 to the next live tile update so the count should be 2.
I must say that ScheduledTaskAgent
finishes its work and then a new instance of it is called, so I think the value that was first called in count must be saved, then at the next call retrieved and added to it +1. but how?
i found an easy sollution today that works. i made use of isolated storage to save the number of the count and give each time it updates +1 to it, then again save the new number (old+1) = new number and so on :) this is the code i use now. And it works perfectly in the ScheduledTaskAgent to update the Live Tile.