im::floo::floolib::BMXUserManager

用户管理器

Public Functions

Name
BMXUserManager(BMXUserService service, BMXClient bmxClient)
void signUpNewUser(final String username, final String password, final BMXDataCallBack< BMXUserProfile > callBack)
注册
void signInByName(final String name, final String password, final BMXCallBack callBack)
用户名登陆
void signInById(final long id, final String password, final BMXCallBack callBack)
id 登陆
void autoSignInByName(final String name, final String password, final BMXCallBack callBack)
自动登陆 根据用户名
void autoSignInById(final long uid, final String password, final BMXCallBack callBack)
自动登陆 根据id
void signOut(final BMXCallBack callBack)
退出登录
void signOut(final long userId, final BMXCallBack callBack)
退出登录
[BMXConnectStatus] connectStatus()
获取当前和服务器的连接状态
[BMXSignInStatus] signInStatus()
获取当前的登录状态
void bindDevice(final String token, final BMXCallBack callBack)
绑定设备推送token
void getDeviceList(final BMXDataCallBack< BMXDeviceList > callBack)
获取登录的设备列表
void deleteDevice(final int device_sn, final BMXCallBack callBack)
删除设备
void getProfile(final boolean forceRefresh, final BMXDataCallBack< BMXUserProfile > callBack)
获取用户详情
void setNickname(final String nickname, final BMXCallBack callBack)
设置昵称
void uploadAvatar(final String avatarPath, final FileProgressListener listener, final BMXCallBack callBack)
上传头像
void downloadAvatar(final BMXUserProfile profile, final FileProgressListener listener, final BMXCallBack callBack)
下载头像
void setPublicInfo(final String publicInfo, final BMXCallBack callBack)
设置公开扩展信息
void setPrivateInfo(final String privateInfo, final BMXCallBack callBack)
设置私有扩展信息
void setAddFriendAuthMode(final BMXUserProfile.AddFriendAuthMode mode, final BMXCallBack callBack)
设置加好友验证方式
void setAuthQuestion(final BMXUserProfile.AuthQuestion authQuestion, final BMXCallBack callBack)
设置加好友验证问题
void setEnablePush(final boolean enable, final BMXCallBack callBack)
设置是否允许推送
void setEnablePushDetaile(final boolean enable, final BMXCallBack callBack)
设置是否推送详情
void setPushNickname(final String nickname, final BMXCallBack callBack)
设置推送昵称
void setPushAlias(final String alias, final String bmxPushToken, final BMXCallBack callBack)
设置推送别名
void setNotificationSound(final boolean enable, final BMXCallBack callBack)
设置收到新消息是否声音提醒
void setNotificationVibrate(final boolean enable, final BMXCallBack callBack)
设置收到新消息是否震动
void setAutoDownloadAttachment(final boolean enable, final BMXCallBack callBack)
设置是否自动缩略图和语音附件
void setAutoAcceptGroupInvite(final boolean enable, final BMXCallBack callBack)
设置是否自动同意入群邀请
void addUserListener(BMXUserServiceListener listener)
添加用户状态监听者
void removeUserListener(BMXUserServiceListener listener)
移除用户状态监听者
void changeAppId(final String appId, final BMXCallBack callBack)
切换appId

Public Functions Documentation

function BMXUserManager

inline BMXUserManager(
    BMXUserService service,
    BMXClient bmxClient
)

function signUpNewUser

inline void signUpNewUser(
    final String username,
    final String password,
    final BMXDataCallBack< BMXUserProfile > callBack
)

注册

Parameters:

function signInByName

inline void signInByName(
    final String name,
    final String password,
    final BMXCallBack callBack
)

用户名登陆

Parameters:

  • name
  • password
  • callBack [BMXErrorCode]

function signInById

inline void signInById(
    final long id,
    final String password,
    final BMXCallBack callBack
)

id 登陆

Parameters:

  • id
  • password
  • callBack [BMXErrorCode]

function autoSignInByName

inline void autoSignInByName(
    final String name,
    final String password,
    final BMXCallBack callBack
)

自动登陆 根据用户名

Parameters:

  • name
  • password
  • callBack [BMXErrorCode]

function autoSignInById

inline void autoSignInById(
    final long uid,
    final String password,
    final BMXCallBack callBack
)

自动登陆 根据id

Parameters:

  • uid
  • password
  • callBack [BMXErrorCode]

function signOut

inline void signOut(
    final BMXCallBack callBack
)

退出登录

Parameters:

  • callBack [BMXErrorCode]

function signOut

inline void signOut(
    final long userId,
    final BMXCallBack callBack
)

退出登录

Parameters:

  • callBack [BMXErrorCode]

function connectStatus

inline BMXConnectStatus connectStatus()

获取当前和服务器的连接状态

function signInStatus

inline BMXSignInStatus signInStatus()

获取当前的登录状态

function bindDevice

inline void bindDevice(
    final String token,
    final BMXCallBack callBack
)

绑定设备推送token

Parameters:

  • token device token
  • callBack [BMXErrorCode]

function getDeviceList

inline void getDeviceList(
    final BMXDataCallBack< BMXDeviceList > callBack
)

获取登录的设备列表

Parameters:

  • callBack [BMXErrorCode] 登录的设备列表

function deleteDevice

inline void deleteDevice(
    final int device_sn,
    final BMXCallBack callBack
)

删除设备

Parameters:

  • callBack [BMXErrorCode]

function getProfile

inline void getProfile(
    final boolean forceRefresh,
    final BMXDataCallBack< BMXUserProfile > callBack
)

获取用户详情

Parameters:

  • forceRefresh 强制从服务器拉取最新结果
  • callBack [BMXErrorCode],用户详情

function setNickname

inline void setNickname(
    final String nickname,
    final BMXCallBack callBack
)

设置昵称

Parameters:

  • nickname 昵称
  • callBack [BMXErrorCode]

function uploadAvatar

inline void uploadAvatar(
    final String avatarPath,
    final FileProgressListener listener,
    final BMXCallBack callBack
)

上传头像

Parameters:

  • avatarPath 头像本地文件路径
  • listener 上传进度监听器
  • callBack [BMXErrorCode]

function downloadAvatar

inline void downloadAvatar(
    final BMXUserProfile profile,
    final FileProgressListener listener,
    final BMXCallBack callBack
)

下载头像

Parameters:

  • profile 用户详情
  • listener 下载进度监听器
  • callBack [BMXErrorCode]

function setPublicInfo

inline void setPublicInfo(
    final String publicInfo,
    final BMXCallBack callBack
)

设置公开扩展信息

Parameters:

  • publicInfo 用户公开信息
  • callBack [BMXErrorCode]

function setPrivateInfo

inline void setPrivateInfo(
    final String privateInfo,
    final BMXCallBack callBack
)

设置私有扩展信息

Parameters:

  • privateInfo 用户私有信息(只对自己可见)
  • callBack [BMXErrorCode]

function setAddFriendAuthMode

inline void setAddFriendAuthMode(
    final BMXUserProfile.AddFriendAuthMode mode,
    final BMXCallBack callBack
)

设置加好友验证方式

Parameters:

  • mode 添加好友时的验证方式
  • callBack [BMXErrorCode]

function setAuthQuestion

inline void setAuthQuestion(
    final BMXUserProfile.AuthQuestion authQuestion,
    final BMXCallBack callBack
)

设置加好友验证问题

Parameters:

  • authQuestion 验证问题
  • callBack [BMXErrorCode]

function setEnablePush

inline void setEnablePush(
    final boolean enable,
    final BMXCallBack callBack
)

设置是否允许推送

Parameters:

  • enable 是否允许推送,true推送,false不推送
  • callBack [BMXErrorCode]

function setEnablePushDetaile

inline void setEnablePushDetaile(
    final boolean enable,
    final BMXCallBack callBack
)

设置是否推送详情

Parameters:

  • enable 是否推送详情,true推送,false不推送
  • callBack [BMXErrorCode]

function setPushNickname

inline void setPushNickname(
    final String nickname,
    final BMXCallBack callBack
)

设置推送昵称

Parameters:

  • nickname 推送昵称
  • callBack [BMXErrorCode]

function setPushAlias

inline void setPushAlias(
    final String alias,
    final String bmxPushToken,
    final BMXCallBack callBack
)

设置推送别名

Parameters:

  • alias 别名
  • bmxPushToken 推送token
  • callBack [BMXErrorCode]

function setNotificationSound

inline void setNotificationSound(
    final boolean enable,
    final BMXCallBack callBack
)

设置收到新消息是否声音提醒

Parameters:

  • enable 收到新消息是否声音提醒,true提醒,false不提醒
  • callBack [BMXErrorCode]

function setNotificationVibrate

inline void setNotificationVibrate(
    final boolean enable,
    final BMXCallBack callBack
)

设置收到新消息是否震动

Parameters:

  • enable 收到新消息是否震动,true震动,false不震动
  • callBack [BMXErrorCode]

function setAutoDownloadAttachment

inline void setAutoDownloadAttachment(
    final boolean enable,
    final BMXCallBack callBack
)

设置是否自动缩略图和语音附件

Parameters:

  • enable 是否自动缩略图和语音附件,true自动下载,false不会自动下载
  • callBack [BMXErrorCode]

function setAutoAcceptGroupInvite

inline void setAutoAcceptGroupInvite(
    final boolean enable,
    final BMXCallBack callBack
)

设置是否自动同意入群邀请

Parameters:

  • enable 是否自动同意入群邀请,true同意,false不同意
  • callBack [BMXErrorCode]

function addUserListener

inline void addUserListener(
    BMXUserServiceListener listener
)

添加用户状态监听者

Parameters:

  • listener 用户状态监听者

function removeUserListener

inline void removeUserListener(
    BMXUserServiceListener listener
)

移除用户状态监听者

Parameters:

  • listener 用户状态监听者

function changeAppId

inline void changeAppId(
    final String appId,
    final BMXCallBack callBack
)

切换appId

Parameters:

  • appId appId

Updated on 2022-01-26 at 17:18:31 +0800

© 2019-2022 美信拓扑 | 官网 该文件修订时间: 2022-03-07 03:07:24

results matching ""

    No results matching ""