sendUserMessageOutsideRoom method
@detail api
@author hanchenchen.c
@brief Send a text message (P2P) to a specified user outside the room
@param uid User ID of the message receiver
@param message
Text message content sent.
Message does not exceed 64 KB.
@param config Message type, see MessageConfig{@link #MessageConfig}.
@return
- > 0: Sent successfully, return the number of the sent message, increment from 1.
@note
- Before sending an out-of-room text message, you must call login{@link #RTCEngine#login} to login.
- After the user calls this interface to send a text message, he will receive an onUserMessageSendResultOutsideRoom{@link #IRTCEngineEventHandler#onUserMessageSendResultOutsideRoom} callback to know whether the message was successfully sent.
- If the text message is sent successfully, the user specified by uid receives the message via the onUserMessageReceivedOutsideRoom{@link #IRTCEngineEventHandler#onUserMessageReceivedOutsideRoom} callback.
Implementation
FutureOr<long> sendUserMessageOutsideRoom(
String uid, String message, MessageConfig config) async {
return await nativeCall(
'sendUserMessageOutsideRoom', [uid, message, config.$value]);
}