Ionic Framework Parse Push Notifications Device Not Registered
I'm trying to get parse push notifications to work on my android device. I have done the GCM setup and tested it with urbanairship. It works. But for some reasons I need to get it
Solution 1:
i also tried so many times on this. iOS did work but not android. but after i installed this plugin it worked.
https://github.com/avivais/phonegap-parse-plugin
Use this in app.js and it did work.
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard// for form inputs)if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
}
if (window.StatusBar) {
// org.apache.cordova.statusbar requiredStatusBar.styleDefault();
}
try{
parsePlugin.initialize('xxx', 'yyy', function() {
alert('success');
}, function(e) {
alert('error');
});
}catch(err){
alert('Parse Error '+err.message); //this gets executed all time
}
});
})
Post a Comment for "Ionic Framework Parse Push Notifications Device Not Registered"