Oppo收不到通知

2023-11-07 00:23:29 浏览数 (2)

采用腾讯IM发送消息,OPPO收不到

Android客户端注册代码如下:

代码语言:javascript复制
    boolean supportPush = PushManager.getInstance().isSupportPush(context);
    if (supportPush) {
        PushManager.getInstance().register(context, PushConstants.OPPO_PUSH_APP_KEY, PushConstants.OPPO_PUSH_APP_SECRET, new PushCallback() {
            @Override
            public void onRegister(int state, String regId) {
                if (state == 0) {
                    setTenCentToken(PushConstants.OPPO_PUSH_BUZID, regId);
                }
            }

            @Override
            public void onUnRegister(int i) {
            }

            @Override
            public void onGetAliases(int i, List<SubscribeResult> list) {
            }

            @Override
            public void onSetAliases(int i, List<SubscribeResult> list) {
            }

            @Override
            public void onUnsetAliases(int i, List<SubscribeResult> list) {
            }

            @Override
            public void onSetUserAccounts(int i, List<SubscribeResult> list) {
            }

            @Override
            public void onUnsetUserAccounts(int i, List<SubscribeResult> list) {

            }

            @Override
            public void onGetUserAccounts(int i, List<SubscribeResult> list) {
            }

            @Override
            public void onSetTags(int i, List<SubscribeResult> list) {

            }

            @Override
            public void onUnsetTags(int i, List<SubscribeResult> list) {
            }

            @Override
            public void onGetTags(int i, List<SubscribeResult> list) {
            }

            @Override
            public void onGetPushStatus(int i, int i1) {
            }

            @Override
            public void onSetPushTime(int i, String s) {
            }

            @Override
            public void onGetNotificationStatus(int i, int i1) {
            }
        });
    }
}

我看文档说需要setAndroidOPPOChannelID可是这个是发送消息的时候传的,现在消息是后端发的,该怎么解决

0 人点赞