Here is my class that I use to receive push notifications and handle ChannelUri . Just call the UpdateChannelUri method. If necessary, the Uri channel will be updated, and the ChannelUriUpdated event will be fired, and the same will be saved in the application data settings.
If your application is running and you receive a notification, one of four methods will be executed with the contents of the notifications, determined by the type of notification.
public sealed class PushService { private const string ChannelUriKey = "ChannelUri"; private const string ChannelUriDefault = null; private PushNotificationChannel _channel; private string _channelUri;
source share