BMXUserManager
class im.floo.floolib.BMXUserManager
用户管理器
- signUpNewUser
- signInByName
- signInById
- autoSignInByName
- autoSignInById
- signOut
- signOut
- connectStatus
- signInStatus
- bindDevice
- getDeviceList
- deleteDevice
- getProfile
- setNickname
- uploadAvatar
- downloadAvatar
- setPublicInfo
- setPrivateInfo
- setAddFriendAuthMode
- setAuthQuestion
- setEnablePush
- setEnablePushDetaile
- setPushNickname
- setPushAlias
- setNotificationSound
- setNotificationVibrate
- setAutoDownloadAttachment
- setAutoAcceptGroupInvite
- addUserListener
- removeUserListener
- changeAppId
- public void signUpNewUser(final String username, final String password, final BMXDataCallBack<BMXUserProfile> callBack);
-
注册
Parameters-
password: String
密码
-
username: String
用户名
-
callBack: <any>
BMXUserProfile
Returns void -
- public void signInByName(final String name, final String password, final BMXCallBack callBack);
-
用户名登陆
Parameters-
name: String
-
password: String
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void signInById(final long id, final String password, final BMXCallBack callBack);
-
id 登陆
Parameters-
id: long
-
password: String
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void autoSignInByName(final String name, final String password, final BMXCallBack callBack);
-
自动登陆 根据用户名
Parameters-
name: String
-
password: String
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void autoSignInById(final long uid, final String password, final BMXCallBack callBack);
-
自动登陆 根据id
Parameters-
uid: long
-
password: String
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void signOut(final BMXCallBack callBack);
-
退出登录
Parameters-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void signOut(final long userId, final BMXCallBack callBack);
-
退出登录
Parameters-
callBack: long
BMXErrorCode
Returns void -
- public BMXConnectStatus connectStatus();
-
获取当前和服务器的连接状态
Returns BMXConnectStatus
- public BMXSignInStatus signInStatus();
-
获取当前的登录状态
Returns BMXSignInStatus
- public void bindDevice(final String token, final BMXCallBack callBack);
-
绑定设备推送token
Parameters-
token: String
device token
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void getDeviceList(final BMXDataCallBack<BMXDeviceList> callBack);
-
获取登录的设备列表
Parameters-
callBack: <any>
BMXErrorCode 登录的设备列表
Returns void -
- public void deleteDevice(final int device_sn, final BMXCallBack callBack);
-
删除设备
Parameters-
callBack: int
BMXErrorCode
Returns void -
- public void getProfile(final boolean forceRefresh, final BMXDataCallBack<BMXUserProfile> callBack);
-
获取用户详情
Parameters-
forceRefresh: boolean
强制从服务器拉取最新结果
-
callBack: <any>
BMXErrorCode,用户详情
Returns void -
- public void setNickname(final String nickname, final BMXCallBack callBack);
-
设置昵称
Parameters-
nickname: String
昵称
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void uploadAvatar(final String avatarPath, final FileProgressListener listener, final BMXCallBack callBack);
-
上传头像
Parameters-
avatarPath: String
头像本地文件路径
-
listener: FileProgressListener
上传进度监听器
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void downloadAvatar(final BMXUserProfile profile, final FileProgressListener listener, final BMXCallBack callBack);
-
下载头像
Parameters-
profile: BMXUserProfile
用户详情
-
listener: FileProgressListener
下载进度监听器
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void setPublicInfo(final String publicInfo, final BMXCallBack callBack);
-
设置公开扩展信息
Parameters-
publicInfo: String
用户公开信息
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void setPrivateInfo(final String privateInfo, final BMXCallBack callBack);
-
设置私有扩展信息
Parameters-
privateInfo: String
用户私有信息(只对自己可见)
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void setAddFriendAuthMode(final BMXUserProfile.AddFriendAuthMode mode, final BMXCallBack callBack);
-
设置加好友验证方式
Parameters-
mode: AddFriendAuthMode
添加好友时的验证方式
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void setAuthQuestion(final BMXUserProfile.AuthQuestion authQuestion, final BMXCallBack callBack);
-
设置加好友验证问题
Parameters-
authQuestion: AuthQuestion
验证问题
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void setEnablePush(final boolean enable, final BMXCallBack callBack);
-
设置是否允许推送
Parameters-
enable: boolean
是否允许推送,true推送,false不推送
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void setEnablePushDetaile(final boolean enable, final BMXCallBack callBack);
-
设置是否推送详情
Parameters-
enable: boolean
是否推送详情,true推送,false不推送
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void setPushNickname(final String nickname, final BMXCallBack callBack);
-
设置推送昵称
Parameters-
nickname: String
推送昵称
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void setPushAlias(final String alias, final String bmxPushToken, final BMXCallBack callBack);
-
设置推送别名
Parameters-
alias: String
别名
-
bmxPushToken: String
推送token
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void setNotificationSound(final boolean enable, final BMXCallBack callBack);
-
设置收到新消息是否声音提醒
Parameters-
enable: boolean
收到新消息是否声音提醒,true提醒,false不提醒
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void setNotificationVibrate(final boolean enable, final BMXCallBack callBack);
-
设置收到新消息是否震动
Parameters-
enable: boolean
收到新消息是否震动,true震动,false不震动
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void setAutoDownloadAttachment(final boolean enable, final BMXCallBack callBack);
-
设置是否自动缩略图和语音附件
Parameters-
enable: boolean
是否自动缩略图和语音附件,true自动下载,false不会自动下载
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void setAutoAcceptGroupInvite(final boolean enable, final BMXCallBack callBack);
-
设置是否自动同意入群邀请
Parameters-
enable: boolean
是否自动同意入群邀请,true同意,false不同意
-
callBack: BMXCallBack
BMXErrorCode
Returns void -
- public void addUserListener(BMXUserServiceListener listener);
-
添加用户状态监听者
Parameters-
listener: BMXUserServiceListener
用户状态监听者
Returns void -
- public void removeUserListener(BMXUserServiceListener listener);
-
移除用户状态监听者
Parameters-
listener: BMXUserServiceListener
用户状态监听者
Returns void -
- public void changeAppId(final String appId, final BMXCallBack callBack);
-
切换appId
Parameters-
appId: String
appId
Returns void -