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 to run with parse. What I have done so fare...
in my $ionicPlatform.ready
function I initialize the parse plugin like this:
window.parsePlugin.initialize(
"XXX",
"XXX",
function() {
alert( 'PARSE INIT OK' );
window.parsePlugin.getInstallationId(function(id) {
installationID = id;
}, function(e) {
console.log("Error Getting ID: " + e.code + " : " + e.message);
})
},
function( e ) {
alert( 'PARSE FAILED' );
});
});
In my HelloCordova.java
files onCreate
function I added this:
Parse.initialize(this, "XXX", "XXX");
PushService.setDefaultPushCallback(this, HelloCordova.class);
ParseAnalytics.trackAppOpened(getIntent());
ParseInstallation.getCurrentInstallation().saveInBackground();
I followed the Parse Android instructions to modify my AndroidManifest.xml
.
And I added the parse and phonegap notification plugin to the project.
cordova plugin add https://github.com/avivais/phonegap-parse-plugin
But I can't register the device for Parse notification.