问题
hi I have been developing an App for Windows Phone 7 with daily update when start and push notification enable. so far I use 2 types of push notification at the same time ( toast and tile ). since my App need a long time update. so I will have to distinct between normal start ( will update ) and start from push notification ( no update will be allowed ). Now I can distinct for the toast with query string. but when start from tile I can't because I donno how to get the count from the tile of my App.
so the question is "How can I get the count from tile notification ?"
回答1:
You can query your tile data when the app is launching and look at the Count property, if > 0 it's a launch after notification.
To get your application tile:
var tileToFind = ShellTile.ActiveTiles.First();
int count = tileToFind.Count;
来源:https://stackoverflow.com/questions/7977836/distinct-normal-launch-with-push-notification-windows-phone-7