Abhishek Maity on Mon, 22 Jul 2013 08:45:01
I am creating notification channel as
HttpNotificationChannel channel = new HttpNotificationChannel("MyPushChannel"); channel.ShellToastNotificationReceived += channel_ShellToastNotificationReceived; channel.ChannelUriUpdated += channel_ChannelUriUpdated; channel.Open(); channel.BindToShellToast();
Now HttpNotificationChannel.Find("MyPushChannel") gives me the Push Channel I created, even after I restart the app.
However, each time after phone restart, this method returns null.
Is it normal? Do I need to recreate my Push Channel every time after phone restart?
SMDWP on Mon, 22 Jul 2013 08:55:25
Rather than create a new channel, you should use the Find method to find the channel, and create it if it doesn't exist, the following shows how this is achieved :-
Hope this helps.
Abhishek Maity on Mon, 22 Jul 2013 09:12:12
Yeah I read that.
I assumed that, after calling HttpNotificationChannel.Open(), until I call HttpNotificationChannel.Close(), I can always find the channel by calling HttpNotificationChannel.Find(channelName).
Can you please confirm that this is not the case after restart?
Eric Fleck on Thu, 01 Aug 2013 15:40:08
Are you testing on a physical phone or on the emulator?
I would expect this in the emulator because the emulator always starts using the snapshot created during setup.
For a physical phone the channel should persist across reboot as long as you have bound the channel for tile and/or toast notifications. (BindToShellTile, BindToShellToast)