与推送通知不同的正常启动Windows Phone 7 [英] Distinct normal launch with push notification Windows Phone 7
问题描述
我一直在为Windows Phone 7开发一个应用程序,该应用程序在启用启动和推送通知时每天更新.到目前为止,我同时使用两种类型的推送通知(toast和tile).因为我的应用程序需要长时间更新.因此,我必须区分正常启动(将更新)和从推送通知开始(不允许更新).现在,我可以通过查询字符串来区分烤面包了.但是当从图块开始时,我不能,因为我不知道如何从我的应用程序的图块中获取计数.
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 ?"
推荐答案
您可以在应用启动时查询平铺数据,并查看Count属性,如果> 0,则表示在通知后启动.
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;
这篇关于与推送通知不同的正常启动Windows Phone 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!