我正在尝试使用Android上的Parse创建推送通知。测试后我得到了这个错误。知道该怎么办? 我尝试了模拟器,它在那里工作,但它不能在我的设备(Galaxy S3)上工作。
尝试注册GCM推送时出错
java.lang.Exception: GCM registration error: INVALID_SENDER
at com.parse.GcmRegistrar$Request.finish(GcmRegistrar.java:325)
at com.parse.GcmRegistrar$Request.onReceiveResponseIntent(GcmRegistrar.java:315)
at com.parse.GcmRegistrar.handleRegistrationIntent(GcmRegistrar.java:202)
at com.parse.PushService.onHandleGcmIntent(PushService.java:531)
at com.parse.PushService.access$000(PushService.java:112)
at com.parse.PushService$7.run(PushService.java:516)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)
答案 0 :(得分:0)
尝试在Parse Java方法中添加:
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);
}
}
});
我想在尝试使用Parse Push时遇到了同样的错误。