chrjs75 on Mon, 20 Jan 2014 13:41:45
Documentation says that:
<<Channel URLs can expire and are not guaranteed to remain the same each time you request one. Therefore, your app should request a channel each time the app launches. If the returned channel URL is different than the URL that you had been using, update your reference in your app server.>>My question is: because a single user/account can use different devices, how I can invalidate old URIs for a specific user?
Several users complain that thei receive several notifications on the same device, because several URIs seems to be active in the same time.
Eric Fleck on Mon, 20 Jan 2014 16:10:14
My question is: because a single user/account can use different devices, how I can invalidate old URIs for a specific user?
Is your server keeping track by user name but not keeping track of the device ID to which a given channel belongs?
A channel Uri is specific to a single device so, for example, if your user has 3 different devices and they register for notification on all three then your server would need to keep track of 3 different channel Uris, one for each device.
chrjs75 on Tue, 21 Jan 2014 11:37:42
Correct. Can you suggest the standard way to retrieve the DeviceID?
chrjs75 on Tue, 21 Jan 2014 13:23:53
Found the deviceId by the DeviceExtendedProperties class.
Thanks for the confirmation. I supposed to need to link the push url to the device, but I did not found anything about that so I started thinking about that the URLs do have different meaning...
Eric Fleck on Tue, 21 Jan 2014 17:00:25
If you're targeting Windows Phone 8 you can also use HostInformation.PublisherHostId property... the two APIs provide the same functionality.