Send push notifications from your server to your customers devices. You can send a tile, toast, badge or raw push notifications. The basic step by step actions and additional setup is described in the setup section at the bottom of the page
C#using CI.WSANative.Notification;
Creates a uri which allows your sever to send push notifications to this device / user
Response will be null if the request fails - this could be due to there being no data connection
Response also indicates when the channel expires and allows you to close it manually
C#WSANativeNotification.CreatePushNotificationChannel((response) => { });
Send the uri which was generated in the above step to your server
The uri is posted with content type x-www-form-urlencoded in the form { key:ChannelUri, value:uri }
You can leave authorisation empty if you don't want to pass a key that authenticates your app with the server, if you provide a value it will be passed as the Authorization header
C#WSANativeNotification.SendPushNotificationUriToServer("https://www.yourserver.com", "uri", "authorisation", (success, message) =>
{
});
- Call WSANativeNotification.CreatePushNotificationChannel in order to get a URI which the server can use to communicate with this device / user
- Send this uri to the server using WSANativeNotification.SendPushNotificationUriToServer, the server should store the uri
- Your application should have a default tile configured, see documentation here NOTE: It is recommended that the first 2 steps be repeated each time the app starts up as the uri is only valid for 30 days