Agora Java API Reference for Android
Public Member Functions | List of all members
io.agora.rtm.RtmMessage Class Reference

Public Member Functions

Object getData ()
 
RtmMessageType getType ()
 
 RtmMessage ()
 
 RtmMessage (byte[] data, int type)
 
String toString ()
 

Constructor & Destructor Documentation

◆ RtmMessage()

io.agora.rtm.RtmMessage.RtmMessage ( )

Creates a new instance of

with default parameters.

Member Function Documentation

◆ getData()

Object io.agora.rtm.RtmMessage.getData ( )

Retrieves the payload of the message.

Note: If the message payload is a string(you can get message type by

), will return a string. If the message payload is binary, will return a byte array.

◆ getType()

RtmMessageType io.agora.rtm.RtmMessage.getType ( )

Retrieves the type of the message.

Returns
The type of the message, see RtmMessageType
io.agora.rtm.RtmMessage.RtmMessage
RtmMessage()
Definition: RtmMessage.java:51
io.agora.rtm.RtmMessage.getType
RtmMessageType getType()
Definition: RtmMessage.java:44