Parse Push Notification not work on android

后端 未结 4 1361
没有蜡笔的小新
没有蜡笔的小新 2021-01-01 07:09

I am using parse push notification for my android app. I follow tutorial and i downlaod jar file and than import it into my project and i have added this code into my manife

4条回答
  •  情深已故
    2021-01-01 07:33

    add this into your delegate or activity on onCreate

    ParsePush.subscribeInBackground("[channel name]", 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);
                }
              }
            });
    

提交回复
热议问题