Signaling (previously RTM) SDK v1.5.0 API Reference for Android
Public Member Functions | List of all members
io.agora.rtm.RtmChannelAttribute Class Reference

Public Member Functions

  RtmChannelAttribute (String key, String value)
 
  RtmChannelAttribute (String key, String value, String userId, long updateTs)
 
void  setKey (String key)
 
String  getKey ()
 
void  setValue (String value)
 
String  getValue ()
 
String  getLastUpdateUserId ()
 
long  getLastUpdateTs ()
 
String  toString ()
 

Constructor & Destructor Documentation

◆ RtmChannelAttribute() [1/2]

io.agora.rtm.RtmChannelAttribute.RtmChannelAttribute ( String  key,
String  value 
)

Construction method of the RtmChannelAttribute class.

Parameters
key Key of channel attribute. Must be visible characters and not exceed 32 Bytes.
value Value of the channel attribute. Must not exceed 8 KB.

◆ RtmChannelAttribute() [2/2]

io.agora.rtm.RtmChannelAttribute.RtmChannelAttribute ( String  key,
String  value,
String  userId,
long  updateTs 
)

Construction method of the RtmChannelAttribute class.

Parameters
key The attribute name. Must be visible characters and not exceed 32 Bytes in length.
value The attribute value. Must not exceed 8 KB in length.
userId User ID of the user who makes the latest update to the channel attribute.
updateTs The timestamp (ms) of when the channel attribute was last updated.

Member Function Documentation

◆ setKey()

void io.agora.rtm.RtmChannelAttribute.setKey ( String  key )

Sets the key of the channel attribute.

Parameters
key Key of channel attribute. Must be visible characters and not exceed 32 Bytes.

◆ getKey()

String io.agora.rtm.RtmChannelAttribute.getKey ( )

Gets the key of the channel attribute.

Returns
Key of the channel attribute that is set using the setKey method.

◆ setValue()

void io.agora.rtm.RtmChannelAttribute.setValue ( String  value )

Sets the value of the channel attribute.

Parameters
value Value of the channel attribute. Must not exceed 8 KB in length.

◆ getValue()

String io.agora.rtm.RtmChannelAttribute.getValue ( )

Gets the value of the channel attribute.

Returns
Value of the channel attribute that is set using the setValue method.

◆ getLastUpdateUserId()

String io.agora.rtm.RtmChannelAttribute.getLastUpdateUserId ( )

Gets the User ID of the user who makes the latest update to the channel attribute.

Returns
User ID of the user who makes the latest update to the channel attribute.

◆ getLastUpdateTs()

long io.agora.rtm.RtmChannelAttribute.getLastUpdateTs ( )

Gets the timestamp of when the channel attribute was last updated.

Returns
Timestamp of when the channel attribute was last updated in milliseconds.