-2

I am making use of microsoft push notification service to push notification from a web service to windows phone app. My doubt is that , how will i pass the message to mspn service (end point)? will we receive any information while we register app to mspn service?

Eran
  • 387,369
  • 54
  • 702
  • 768
Mridul Raj
  • 1,001
  • 4
  • 19
  • 46
  • It's not clear to me what your question is here? I'm assuming that you've read the [Push Notifications Overview for Windows Phone](http://msdn.microsoft.com/en-us/library/ff402558%28v=vs.92%29.aspx) on MSDN? – Rowland Shaw May 15 '12 at 11:24
  • yes. i have read it.It says you need to pass uri+payload to mspn service. but when we pass such information , you need some destination(endpoint on mspn) . How or when do i get that information? – Mridul Raj May 15 '12 at 12:48

1 Answers1

1

Setting up push notifications has several steps, and to paraphrase the Push Notifications Overview for Windows Phone on MSDN:

  1. Your application registers for push notifications via an instance of the HttpNotificationChannel class
  2. The instance of HttpNotificationChannel does the negotiation with MPNS
  3. Assuming step (2) was successful, the instance raises the ChannelUriUpdated event
  4. You pass the URI in the ChannelUri property to your web service (along with whatever metadata you need to identify what push notifications should be sent to that URI)
  5. Your webservice issues a POST request to the URI passed to it in step (4), with the relevant XML as the message body (that XML will change, depending on the type of notification you're trying to send)
  6. The MPNS servers send that notification to the phone, which will update the Tile, show a Toast notification, or, if it was a RAW notification and your application is running, the HttpNotificationChannel object created in step 1 will raise the HttpNotificationReceived event.

To summarize, and directly answer your question, the endpoint is the URI from the ChannelUri property of your HttpNotificationChannel instance

Rowland Shaw
  • 37,700
  • 14
  • 97
  • 166