I am developing a winrt Windows 8.1 app with PHP services. Using the code given in the link ( https://www.codeproject.com/Articles/1089935/Send-Push-Notifications-to-Windows-Phone-App-Using ) we have developed the push notification service both in client and server end. But we are not geeting any notification on device. The steps we have followed till now are as below :
1. Enabled Toast Capable option
2. Added a Background Task(Push Notification)
3. Registered a channel uri and send it to the server for sending push.
private void CreateUri()
{
string notificationUrl;
var channel = Task.Run(async () => await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync()).Result;
channel.PushNotificationReceived += channel_PushNotificationReceived;
//localSettings.Values["ChannelUri"] = channel.ToString();
notificationUrl = channel.Uri.ToString();
var result = Task.Run(async () => await this.regPush.GetPushNotifRegID(this.customerId, notificationUrl)).Result;
RegisterBackgroundTask();
}
We got a channel uri like this : https://hk2.notify.windows.com/?token=AwYAAAC8OZsKv0lulse+lxPQF7NGostwaolxwNWgXqfw1Ed8Pm1hySMyCQuMARKiNhFQ0bCm5D1esKgnIcl8qw/ahP+b4Q6nU0HSouzHKvg38x30p+ytlLCETXvV3wvnhXySWRM=
4. Using this channel uri we send the push after registering the App with WNS and getting the accessToken
{
"token_type": "bearer",
"access_token": "EgCbAQMAAAAEgAAADAABBEZezsYWE3v6nE/0SKOxQv66Dlcs0WZP2zCZJl0xIV246+nqQpkQHBcmMz0tAaqCe/OtcO/WF1OTuuubyWVcyNnANtFSL0XS2oPSRWA55ZwkK+D4tHrR/i2RHvCqL+QaDLG7wUT5Lw+4DFnVYXbcrJyZoYaTDYHvNk4/dYERpTjTpEYRJw+t+7L77HJHCf4oLg9VKWoUTqLzv/ycQfkX09/FHyTHaDRxKRvy3qCwAGL1o3VeNJ1P076Q883nZbIpWsWXCOyuUjIHo86DNju/a/c44fo3BS+W9IzcwBRKIvFnKfPxlg2s+/02L1972x46rwhK6XYDYR2vM+uX4R0wtooAWgCKAAAAAAADDhpEv4J4WL+CeFjrSAQADQA1Mi42Ni45MC4xNDAAAAAAAF0AbXMtYXBwOi8vcy0xLTE1LTItMzMxNzk5MzY4OC0zNzExMDMyODMyLTM4NzIzMzA1NS03NjgwMTk5NTQtNDE3Mzg4NjI1MC0xMDI4MTQwMjk0LTIwMDQwODgwNTUA",
"expires_in": 86400}
These all we have done but we are not receiving any push from the server. Any help on this will be appreciated. Thanks in advance.