Reputation: 2788
Maybe anyone can help me ! I want to send a push notification just to every registered device from a simple android app. (to everyone). There are working examples how to make this possible with php but i don´t know how to send a push notification to all (without channel) to all ?
I have found this information so far but its not working
My Channel is "" and the goal is to send a push to all devices !
ParseQuery pushQuery = ParseInstallation.getQuery();
pushQuery.whereEqualTo("channels", "");
ParsePush push = new ParsePush();
push.setQuery(pushQuery); // Set our Installation query
push.setMessage("Hello world!");
push.sendInBackground();
I have changed my code like this but it is still not working !
ParsePush.subscribeInBackground("bugatti", new SaveCallback() {
@Override
public void done(ParseException e) {
if (e == null) {
Log.d("com.parse.push", "successfully subscribed to the broadcast channel.");
} else {
Log.e("com.parse.push", "failed to subscribe for push", e);
}
}
});
ParseQuery pushQuery = ParseInstallation.getQuery();
pushQuery.whereEqualTo("channels", "bugatti");
ParsePush push = new ParsePush();
push.setQuery(pushQuery);
push.setChannel("bugatti");
push.setMessage("Hello world!");
push.sendInBackground();
Would be nice if anybody could help me !
Upvotes: 0
Views: 293
Reputation: 824
You just need to enable "Sending Notifications".
Enjoy!
Upvotes: 1