我遇到了一个奇怪的问题。我通过休息电话呼叫解析推送api。状态显示200.但我的Android设备没有收到通知(10次中有9次没有收到通知)。
从我的服务器发送的数据
{"data":{"message":"dd","lastName":"Raman","alert":"New Message","notificationType":"MSG","from":134,"date":1422977063220,"firstName":"Mithun"},"where":{"deviceToken":{"$in":["MyDeviceToken"]},"deviceType":"android"}}
我的安卓类
public class Receiver extends ParsePushBroadcastReceiver {
@Override
protected void onPushReceive(Context context, Intent intent) {
//I put a break point here.. This never gets called
}
}
我的应用类
public class TMP extends Application {
@Override
public void onCreate() {
super.onCreate();
Parse.enableLocalDatastore(this);
Parse.initialize(this, "ABC", "ABC");
ParseInstallation.getCurrentInstallation().saveInBackground(new SaveCallback() {
@Override
public void done(ParseException e) {
if (e == null) {
}
}
});
}
}
任何人都面临这个问题?任何帮助表示赞赏。感谢。