1 package com.netease.nimlib.sdk.qchat.param;
3 import android.text.TextUtils;
5 import androidx.annotation.NonNull;
10 import java.util.List;
38 private final String account;
43 private final String token;
47 private String appKey;
55 private String loginExt;
59 private Integer customClientType;
63 private String customPushContentType;
67 private String customTag;
120 this.loginExt = loginExt;
128 return customClientType;
136 this.customClientType = customClientType;
152 this.customTag = customTag;
160 return customPushContentType;
168 this.customPushContentType = customPushContentType;
176 return loginCallback;
186 this.account = SDKCache.getAuthInfo() == null ?
"" : SDKCache.getAuthInfo().getAccount();
187 this.token = SDKCache.getAuthInfo() == null ?
"" : SDKCache.getAuthInfo().getToken();
188 this.appKey = SDKCache.getAppKey();
190 int authType = SDKCache.getAuthInfo() == null ?
QChatAuthType.
DEFAULT.getValue() : SDKCache.getAuthInfo().getAuthType();
197 this.loginCallback = null;
211 this.loginCallback = callback;
212 this.account = account;
214 this.appKey = appKey;
215 this.authType = authType;
224 return !TextUtils.isEmpty(account) && !TextUtils.isEmpty(token) && !TextUtils.isEmpty(appKey);
228 return !TextUtils.isEmpty(account) && !TextUtils.isEmpty(appKey);
Integer getCustomClientType()
获取自定义客户端类型
String getAccount()
获取用户账号
String getAppKey()
获取appKey
String getCustomTag()
获取自定义Tag
String getCustomPushContentType()
获取自定义推送文案类型
void setCustomTag(String customTag)
设置自定义Tag
void setCustomPushContentType(String customPushContentType)
设置自定义推送文案类型,离线推送不显示详情时,要显示的文案对应的类型名称
List< String > getQChatLinkAddresses(final String account)
获取link地址列表
QChatLoginCallback getLoginCallback()
获取圈组登录独立模式回调
void setCustomClientType(int customClientType)
设置自定义客户端类型
QChatAuthType getAuthType()
获取鉴权方式
String getToken()
获取用户token
String getLoginExt()
获取登录自定义字段
static QChatAuthType typeOfValue(int value)
void setLoginExt(String loginExt)
设置登录自定义字段
QChatLoginParam()
非独立模式下,圈组登录参数的构造函数, 不需要传入account、token、appKey、authType、loginCallback acco...
boolean isValid()
数据是否有效,有效时才会进行登录操作,否则返回RES_EPARAM