I've successfully integrated Parse.com to android app & the push notification was worked perfectly when i tried to send the notification from Data browser.
Now, when i tried to achieve to send the notification from device, it doesn't send anything & there's no log even in the Push notification section in Parse Data browser.
Also, i've enabled Client Push enabled in setting.
Here's my code :
public class ParseApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
ParseCrashReporting.enable(this);
Parse.enableLocalDatastore(this);
Parse.initialize(this, "xxx", "xxx");
ParsePush.subscribeInBackground("",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);
}
}
});
ParseInstallation.getCurrentInstallation().saveInBackground();
ParsePush parsePush = new ParsePush();
parsePush.setChannel("Everyone");
parsePush.setMessage("Helloooooo :)");
parsePush.sendInBackground(new SendCallback() {
@Override
public void done(ParseException e) {
Log.d("parse push","Parse push sent");
}
});
}
}
In logcat, i received push notification sent successfully but it doesn't. Where i'm making the mistake?