Is it possible to persist the PushNotificationChannel to storage in Windows 8?
I’m using the channel both in a background task and using the Received event whilst the app is active. As the PushNotificationChannel class is sealed and has no public constructor it cannot be stored in ApplicationSettings or serialized via JSON/XML to a file.
I don’t really want to be requesting a new channel everytime the app starts when the channel only expires every 30 days.
The service is using raw notifications not tile/toast and need to be handled by the app if it is open or not.
Actually, you should request a new channel each time your application starts. From Guidelines and Checklist for push notifications
I have heard, but have NOT confirmed, that the URI may change if there are hardware modifications as well (I know the ASHWID does), so 30-days may be a ‘max’ at this point.
You won’t necessarily want to update your cloud service that manages the registrations when there’s no change, but saving the URI in ApplicationSettings is enough to manage that.