rodrigobertin
2/11/2016 - 6:04 PM

Window phone uri device

Window phone uri device

function registerMPNS(){
    var pushNotification;
    pushNotification = window.plugins.pushNotification;
    pushNotification.register(
    channelHandler,
    errorHandler,
    {
        "channelName": "xyz", //channelName is whateveryou like
        "ecb": "onNotificationWP8",
        "uccb": "channelHandler",
        "errcb": "jsonErrorHandler"
    });
}

$window.onNotificationWP8 = function(e){

}

function channelHandler(event){
    var uri = event.uri;
    console.log(uri);
    //This is the uri you need for push notification
}

function errorHandler(e){
  
}

function successHandler(e) {
  
}
return{
    register: function(){
        return registerMPNS();
    }       
};