getPeerOnlineStatus method

FutureOr<int> getPeerOnlineStatus(
  1. NSString peerUserId
)

@detail api @author hanchenchen.c @brief Query the login status of the opposite or local user @param peerUserId
User ID to query @return - 0: Success. - < 0 : Fail. See ByteRTCReturnStatus{@link #ByteRTCReturnStatus} for more details @note - You must call login:uid:{@link #ByteRTCEngine#login:uid} After logging in, you can call this interface. - After calling this interface, the SDK will use rtcEngine:onGetPeerOnlineStatus:status:{@link #ByteRTCEngineDelegate#rtcEngine:onGetPeerOnlineStatus:status} callback to notify the query result. - Before sending an out-of-room message, the user can know whether the peer user is logged in through this interface to decide whether to send a message. You can also check your login status through this interface.

Implementation

FutureOr<int> getPeerOnlineStatus(NSString peerUserId) async {
  return await nativeCall('getPeerOnlineStatus:', [peerUserId]);
}