Package io.agora.rtm

Class RtmMessage

java.lang.Object
io.agora.rtm.RtmMessage

public class RtmMessage extends Object
  • Constructor Details

    • RtmMessage

      public RtmMessage(byte[] data, int type)
  • Method Details

    • getData

      public Object getData()
      Retrieves the payload of the message.

      Note: If the message payload is a string(you can get message type by getType()), will return a string. If the message payload is binary, will return a byte array.

    • getType

      public RtmConstants.RtmMessageType getType()
      Retrieves the type of the message.
      Returns:
      The type of the message, see RtmConstants.RtmMessageType
    • toString

      public String toString()
      Overrides:
      toString in class Object