1 package com.netease.nimlib.sdk.chatroom.model;
3 import android.text.TextUtils;
13 private String roomId;
18 private boolean independentMode;
27 private String appKey;
29 private String account;
40 private String avatar;
42 private Map<String, Object> extension;
44 private Map<String, Object> notifyExtension;
48 private String notifyTargetTags;
54 private Integer loginAuthType;
56 private String loginExt;
135 this.avatar = avatar;
153 this.extension = extension;
162 return notifyExtension;
171 this.notifyExtension = notifyExtension;
195 return notifyTargetTags;
203 this.notifyTargetTags = notifyTargetTags;
212 return independentMode;
242 return loginAuthType;
250 this.loginAuthType = loginAuthType;
266 this.loginExt = loginExt;
270 return chatRoomSpatialLocation;
274 this.chatRoomSpatialLocation = chatRoomSpatialLocation;
279 return chatRoomAuthProvider;
285 this.chatRoomAuthProvider = chatRoomAuthProvider;
289 return independentModeCallback;
293 return antiSpamConfig;
297 this.antiSpamConfig = antiSpamConfig;
308 this.independentMode =
true;
309 this.independentModeCallback = cb;
310 this.account = account;
312 this.isAnonymousMode = TextUtils.isEmpty(account);
324 this.independentMode =
true;
325 this.independentModeCallback = cb;
326 this.account = account;
332 this.roomId = roomId;
336 if (TextUtils.isEmpty(roomId)) {
340 Long.parseLong(roomId);
342 }
catch (NumberFormatException e) {
Created by huangjun on 2015/12/28.
聊天室独立登录模式的回调函数,用于上层 APP 向 SDK 提供数据
void setLoginAuthType(Integer loginAuthType)
设置鉴权方式
Map< String, Object > getExtension()
获取进入聊天室后展示的扩展字段
void setNotifyTargetTags(String notifyTargetTags)
设置 登录登出通知的目标标签
void setAntiSpamConfig(AntiSpamConfig antiSpamConfig)
ChatRoomIndependentCallback getIndependentModeCallback()
String getAvatar()
获取聊天室展示的头像
EnterChatRoomData(String roomId)
String getNick()
获取聊天室展示的昵称
AntiSpamConfig getAntiSpamConfig()
boolean isAnonymousMode()
ChatRoomSpatialLocation getChatRoomSpatialLocation()
String getNotifyTargetTags()
获取 登录登出通知的目标标签
void setIndependentMode(ChatRoomIndependentCallback cb, String account, String token)
设置聊天室独立模式
String getAccount()
获取独立登录模式的用户账号
使用进入聊天室时使用动态token方式时,SDK通过该接口从App获取动态token
void setAvatar(String avatar)
设置聊天室展示的头像
String getAppKey()
获取聊天室appKey
String getLoginExt()
获取登录自定义字段
void setExtension(Map< String, Object > extension)
设置进入聊天室后展示的扩展字段,长度限制4k
void setLoginExt(String loginExt)
设置登录自定义字段
Integer getLoginAuthType()
获取鉴权方式
void setTags(String tags)
设置 登录标签
void setRoomId(String roomId)
设置聊天室id
String getToken()
获取独立登录模式的用户密码
Map< String, Object > getNotifyExtension()
获取聊天室通知开发者扩展字段
void setNick(String nick)
设置聊天室展示的昵称,可选字段,如果不填则直接使用NimUserInfo的数据
void setAppKey(String appKey)
设置聊天室appKey,独立登录模式下,才启用, 不传则使用IM对应的appKey, 需要保证roomId与appKey的对应关...
String getRoomId()
获取聊天室id
void setChatRoomAuthProvider(ChatRoomAuthProvider chatRoomAuthProvider)
void setIndependentMode(ChatRoomIndependentCallback cb, String account, String token, boolean isAnonymousMode)
设置聊天室独立模式
ChatRoomAuthProvider getChatRoomAuthProvider()
boolean isIndependentMode()
是否是独立登录聊天室
void setChatRoomSpatialLocation(ChatRoomSpatialLocation chatRoomSpatialLocation)
void setNotifyExtension(Map< String, Object > notifyExtension)
设置聊天室通知开发者扩展字段,长度限制1k