How to send push notification from web app to Android device using Parse?
We actually do this by sending a push message from mobile to mobile. We are now trying to send a push notification from a web app to mobile devices using javascript. we tried like this
function authentication() {
Parse.$ = jQuery;
// Initialize Parse with your Parse application javascript keys
Parse.initialize("app key",
"script key");
var pushQuery = new Parse.Query(Parse.Installation);
pushQuery.equalTo("channels","Demo");
var promise = new Parse.Promise();
debugger;
Parse.Push.send({
where: pushQuery,
data: {
alert : "Hello word"
}}, { success: function() {
// Push was successful
alert : "Push was successful"
},
error: function(error) {
promise.reject(error);
}}).then (function(error) {
//Marks this promise as fulfilled,
//firing any callbacks waiting on it.
});
return promise;
}
we get an error like this
Failed to load resource: the server responded with a status of 400 (Bad Request)
code: 115
message: "Client-initiated push isn't enabled.
We've also included Client Push
We are new to Push notification.plz. thanks in advance
+3
source to share
1 answer
com step 1: Build your project at parse.com 2. Add the browser notification id to your project. 3.from parse.com you will have a submit button to send a push notification and send a message.
add these links http://www.androidbegin.com/tutorial/android-parse-com-push-notification-tutorial/ www.parse.com
0
source to share