-1

From my windows mobile application, I want to implement the windows notifications.

My mobile application is based on :

  • Cordova (version 4.0.0)
  • Ionic Framework (version 1.0.1)
  • Cordova Windows (version 4.1.0)
  • Deploy on Windows Phone 8.1

To implement this feature, I'm using the cordova plugin "phonegap-push-plugin" (version 1.4.5).

When my mobile application is launched for the first time, I ask to my application to connect to the notification client platform. The goal is this notification client platform ask to WNS to return a new notification channel (URI form) to my application.

When I use the method "registration" from PushNotification class :

 var push = PushNotification.init({
         "windows": {} 
 });

 push.on('registration', function(data) {
       console.log("registration event");
       document.getElementById("regId").innerHTML = data.registrationId;
       console.log(JSON.stringify(data));
 });

I get this error :

The notification client platform is unable to connect to the cloud notification service

I thought the notification client platform is currently under maintenance. I found a file where are IP address ranges used by WNS. But when I ping differents IP address ranges and it works.

Is there anyone who already face this problem ? Or is there anyone who have an idea about how to fix it ?

PauloDev
  • 952
  • 1
  • 8
  • 20

1 Answers1

-1

Ok, I found the problem thanks to one of developper from github of pushplugin.

I had not checked on my Windows Phone that data service is disabled. I thought by default that data service was activated. So, I activated the data service from my Windows Phone and the push notification works again.

So, we must verify the data service is activated on your Windows Phone before to execute push notification method.

Check also your code error and verify what it means from microsoft notification API from here : PushNotificationChannelManager

PauloDev
  • 952
  • 1
  • 8
  • 20