im::floo::floolib::BMXUserServiceListener

User state listener

Public Functions

Name
synchronized void delete()
void swigReleaseOwnership()
void swigTakeOwnership()
void onConnectStatusChanged([BMXConnectStatus] status)
Channel state changed
void onUserSignIn(BMXUserProfile profile)
User login
void onUserSignOut([BMXErrorCode] error, long userId)
User logout
void onInfoUpdated(BMXUserProfile profile)
Synchronize user information updates (when user information changes in other devices)
void onOtherDeviceSingIn(int deviceSN)
User login on another device
void onOtherDeviceSingOut(int deviceSN)
User logout on another device
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
)

Channel state changed

Parameters:

  • status Connection state

Example:

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

function onUserSignIn

inline void onUserSignIn(
    BMXUserProfile profile
)

User login

Parameters:

  • profile User profile

Example:

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

function onUserSignOut

inline void onUserSignOut(
    BMXErrorCode error,
    long userId
)

User logout

Parameters:

  • error State error code

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
)

Synchronize user information updates (when user information changes in other devices)

Parameters:

  • profile User 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
)

User login on another device

Parameters:

  • deviceSN Device serial number

Example:

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

function onOtherDeviceSingOut

inline void onOtherDeviceSingOut(
    int deviceSN
)

User logout on another device

Parameters:

  • deviceSN Device serial number

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-2024 MaximTop | Homepage | Site Map Last modified time: 2024-09-26 03:17:35

results matching ""

    No results matching ""