I receive no success or error when using this plugin
-
I am using the lite version of this plugin. I am using angularjs and wordpress. I have GCM server code and it is correct when i send my application ID on google. But, when i want to register a user by following code, i receive no success or error. Here is my code. I appreciate any idea about my problem.
$rootScope.$on(‘$cordovaPush:notificationReceived’, function(event,notification){
alert(“result: “+ JSON.stringify(notification));var googDevToken = notification.regid;
alert (googDevToken);
var data = {};
data.os= ‘Android’;
data.token= googDevToken;
$http({
method : ‘POST’,
url : ‘https://padraandishan.ir/pnfw/register/’,
data : ‘os=Android&token=’+googDevToken,
headers : {‘Content-Type’: ‘application/x-www-form-urlencoded’}
}).success(function(){
alert (‘sent to server successfully’);
}).error(function(err){
alert(JSON.stringify(err));
});
})
- The topic ‘I receive no success or error when using this plugin’ is closed to new replies.