且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

解析推送通知只在模拟器中工作

更新时间:2023-02-26 21:13:45

改用以下内容:

    // inform the Parse Cloud that it is ready for notifications
    PushService.setDefaultPushCallback(this, MainActivity.class);   
    ParseInstallation.getCurrentInstallation().saveInBackground(new SaveCallback() {
        @Override
        public void done(ParseException e) {
            if (e == null) {

            } else {
                e.printStackTrace();

            }
        }
    });