NIMSDK-AOS  9.16.0
QCMCallback2.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.qcmedia;
2 
5 import com.netease.yunxin.kit.roomkit.api.NEErrorCode;
6 
7 public abstract class QCMCallback2<T> implements QCMCallback<T> {
8 
9  @Override
10  public void onResult(QChatMediaErrorType errorType, int code, @androidx.annotation.Nullable String message,
11  @androidx.annotation.Nullable T data) {
12  if ((errorType == QChatMediaErrorType.ERROR_RTC && code == NEErrorCode.SUCCESS) || (errorType == QChatMediaErrorType.ERROR_QCHAT && code == ResponseCode.RES_SUCCESS)) {
13  onSuccess(data);
14  } else {
15  onError(errorType,code, message);
16  }
17  }
18  public void onSuccess(T data) {}
19 
20  public void onError(QChatMediaErrorType errorType,int code, String message) {}
21 }
void onError(QChatMediaErrorType errorType, int code, String message)
云信服务器主要响应码定义
static final short RES_SUCCESS
操作成功
void onResult(QChatMediaErrorType errorType, int code, @androidx.annotation.Nullable String message, @androidx.annotation.Nullable T data)