im::floo::floolib::BMXUserServiceListener

用户状态监听者

Public Functions

Name
synchronized void delete()
void swigReleaseOwnership()
void swigTakeOwnership()
void onConnectStatusChanged([BMXConnectStatus] status)
链接状态发生变化
void onUserSignIn(BMXUserProfile profile)
用户登陆
void onUserSignOut([BMXErrorCode] error, long userId)
用户登出
void onInfoUpdated(BMXUserProfile profile)
同步用户信息更新(其他设备操作发生用户信息变更)
void onOtherDeviceSingIn(int deviceSN)
用户在其他设备上登陆
void onOtherDeviceSingOut(int deviceSN)
用户在其他设备上登出
BMXUserServiceListener()
void registerUserService(BMXUserService service)

Protected Functions

Name
BMXUserServiceListener(long cPtr, boolean cMemoryOwn)
void finalize()
void swigDirectorDisconnect()
long getCPtr(BMXUserServiceListener obj)

Protected Attributes

Name
transient boolean swigCMemOwn

Public Functions Documentation

function delete

inline synchronized void delete()

Example:

function swigReleaseOwnership

inline void swigReleaseOwnership()

Example:

function swigTakeOwnership

inline void swigTakeOwnership()

Example:

function onConnectStatusChanged

inline void onConnectStatusChanged(
    BMXConnectStatus status
)

链接状态发生变化

Parameters:

  • status 连接状态

Example:

public void onConnectStatusChanged(BMXConnectStatus status) {
    super.onConnectStatusChanged(status);
    toastListener("onConnectStatusChanged");
}

function onUserSignIn

inline void onUserSignIn(
    BMXUserProfile profile
)

用户登陆

Parameters:

  • profile 用户profile

Example:

public void onUserSignIn(BMXUserProfile profile) {
    super.onUserSignIn(profile);
    toastListener("onUserSignIn");
}

function onUserSignOut

inline void onUserSignOut(
    BMXErrorCode error,
    long userId
)

用户登出

Parameters:

  • error 状态错误码

Example:

public void onUserSignOut(BMXErrorCode error, long userId) {
    super.onUserSignOut(error, userId);
    toastListener("onUserSignOut");
    if (error.swigValue() == BMXErrorCode.UserRemoved.swigValue()) {
        // 被其他设备踢下线 跳转到登录页面
        Observable.just("").subscribeOn(Schedulers.computation())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Subscriber<String>() {
                    @Override
                    public void onCompleted() {

                    }

                    @Override
                    public void onError(Throwable e) {

                    }

                    @Override
                    public void onNext(String s) {

function onInfoUpdated

inline void onInfoUpdated(
    BMXUserProfile profile
)

同步用户信息更新(其他设备操作发生用户信息变更)

Parameters:

  • profile 用户profile

Example:

public void onInfoUpdated(BMXUserProfile profile) {
    super.onInfoUpdated(profile);
    toastListener("onInfoUpdated");
    RosterFetcher.getFetcher().putProfile(profile);
    downloadProfileAvatar(profile);
}

function onOtherDeviceSingIn

inline void onOtherDeviceSingIn(
    int deviceSN
)

用户在其他设备上登陆

Parameters:

  • deviceSN 设备序列号

Example:

public void onOtherDeviceSingIn(int deviceSN) {
    super.onOtherDeviceSingIn(deviceSN);
    toastListener("onOtherDeviceSingIn");
}

function onOtherDeviceSingOut

inline void onOtherDeviceSingOut(
    int deviceSN
)

用户在其他设备上登出

Parameters:

  • deviceSN 设备序列号

Example:

public void onOtherDeviceSingOut(int deviceSN) {
    super.onOtherDeviceSingOut(deviceSN);
    toastListener("onOtherDeviceSingOut");
}

function BMXUserServiceListener

inline BMXUserServiceListener()

Example:

function registerUserService

inline void registerUserService(
    BMXUserService service
)

Protected Functions Documentation

Example:

function BMXUserServiceListener

inline BMXUserServiceListener(
    long cPtr,
    boolean cMemoryOwn
)

Example:

function finalize

inline void finalize()

Example:

function swigDirectorDisconnect

inline void swigDirectorDisconnect()

Example:

function getCPtr

static inline long getCPtr(
    BMXUserServiceListener obj
)

Protected Attributes Documentation

variable swigCMemOwn

transient boolean swigCMemOwn;

Example:


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

© 2019-2023 美信拓扑 | 官网 该文件修订时间: 2023-08-09 14:48:15

results matching ""

    No results matching ""