can someone help me to start with push notification in WP7 development?? I used this labs http://msdn.microsoft.com/en-us/wp7trainingcourse_usingpushnotificationslab.aspx to learn about push notifications but stil can't get them to work in my app:/
问题:
回答1:
Jeff Blankenburg (BlankenBlog) had a nice tutorial post that does a good job of showing the different parts that go into a Push notification.Day 19: Push Notifications
回答2:
Push notifications are a bit tricky at the moment. Do you have any specific problems regarding the training course? Please describe what parts you're not getting to work properly and perhaps we can help out.
Some general info on push notifications:
In order to get push notifications to work you need three key ingredients:
- A device (a phone)
- Microsoft Push Network
- A backend application (e.g. cloud service)
The last player is what most people aren't expecting. It would be nice to work without it but at the moment it's a necessary party.
I suggest you to read an excellent series of posts about push notifications from Yochay. You can find the first part of three here:
http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/05/03/understanding-microsoft-push-notifications-for-windows-phones.aspx
This picture describe the flow and key players in a good way:
http://windowsteamblog.com/cfs-filesystemfile.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/wpdev/image_5F00_48BA75B1.png
HTH
回答3:
You can get started with push notifications refering to this doco. It includes the overview, the code samples for creating a channel (which you send to your web service) and a sample of how to implement generating the push notification from your server including the response codes.
Push Notifications for Windows Phone
How to: Set Up a Notification Channel for Windows Phone
How to: Send a Push Notification from a Web Service for Windows Phone
Note that it's been reported that the tool with the training kit to simulate generating notices from your server has been reported to not be up to date with changes that took place in the interface during Beta.
As a result, it will not work with the current Push Notification Service.
The 3rd link above that shows how to generate this is up to date.
回答4:
OK, so this is basically a shameless plug, but I've created an open source framework that helps in getting you started with Toast and Live Tiles. It is available via the nuget package manager and the source code is on github. You can read a bit more about it here:
http://coding-insomnia.com/entile
回答5:
You should see this article that written by Sgt. Conker. http://www.sgtconker.com/2010/03/article-windows-phone-7-push-notifications/ It contains very usefull tips and tricks. And has realy good descriptions as well as source code.
You can be able to start to test example app in simulator.
Good luck
Edit : The link was working when i created this answer. Please have see updated Microsoft MSDN link