I need to send a Push notification message to all users of my app. I understand that I need a URI which I receive from each user to send them back the message.
so, I have to register the ChannelUriUpdated event and send the URI to my server.
In my server, I should store these data in a database, and use the list of URIs to send the message.
I’m not sure if that’s the perfect method to do that. But if it is, How would I know if URI of a specific device gets updated from my server. I don’t want to store multiple URIs in my database for each device.
Should I also send the GUID of the device with the unique URI?
When a push URI is returned by MPNS it identifies a unique “app in device”, i.e., every app installed in a device that requests for push notifications is given a different URI.
Now, I’m not responsible for the WP7 app, just the web servive part, but I think the app must revalidate the URI every time it launches.
In that case, You should update the URI you stored previously and that’s why You should store the device id, so You can track and update the previous channel.
Also pay attention to response codes, as there are situations where You must stop sending new notifications as described here:
http://msdn.microsoft.com/en-us/library/ff941100(v=vs.92).aspx