Chat Android SDK  4.2.9
com.twilio.chat.Member Class Reference

Representation of a Channel Member object. More...

Classes

enum  Type
 Member type. More...
 
enum  UpdateReason
 Indicates reason for member info update. More...
 

Public Member Functions

Getters
native String getSid ()
 Returns unique identifier of a member on a channel. More...
 
native Long getLastConsumedMessageIndex ()
 Return members last consumed message index for this channel. More...
 
native String getLastConsumptionTimestamp ()
 Return members last consumed message timestamp for this channel. More...
 
native Channel getChannel ()
 Return channel this member belongs to. More...
 
native String getIdentity ()
 Return user identity for current member. More...
 
native Type getType ()
 Return Type of current member. More...
 
JSONObject getAttributes ()
 Return custom attributes associated with this member. More...
 
Setters
void setAttributes (JSONObject attributes, StatusListener listener)
 Set attributes associated with this member. More...
 
Actions
void getUserDescriptor (CallbackListener< UserDescriptor > listener)
 Return user descriptor for current member. More...
 
void getAndSubscribeUser (CallbackListener< User > listener)
 Return subscribed user object for current member. More...
 

Detailed Description

Representation of a Channel Member object.

Member Function Documentation

void com.twilio.chat.Member.getAndSubscribeUser ( CallbackListener< User listener)

Return subscribed user object for current member.

Parameters
listenerListener to receive the resulting User or error.
JSONObject com.twilio.chat.Member.getAttributes ( )

Return custom attributes associated with this member.

Returns
the map of attributes as a JSONObject.
native Channel com.twilio.chat.Member.getChannel ( )

Return channel this member belongs to.

Returns
Channel for this member.
native String com.twilio.chat.Member.getIdentity ( )

Return user identity for current member.

Returns
User identity of current member.
native Long com.twilio.chat.Member.getLastConsumedMessageIndex ( )

Return members last consumed message index for this channel.

Returns
consumed message index. Null if not set
See also
getLastConsumptionTimestamp
native String com.twilio.chat.Member.getLastConsumptionTimestamp ( )

Return members last consumed message timestamp for this channel.

Returns
consumed message timestamp. Empty string if consumption index is not set
See also
getLastConsumedMessageIndex
native String com.twilio.chat.Member.getSid ( )

Returns unique identifier of a member on a channel.

Returns
The unique id of a member/channel.
native Type com.twilio.chat.Member.getType ( )

Return Type of current member.

Returns
Type of current member.
void com.twilio.chat.Member.getUserDescriptor ( CallbackListener< UserDescriptor listener)

Return user descriptor for current member.

Parameters
listenerListener to receive the resulting UserDescriptor or error.
void com.twilio.chat.Member.setAttributes ( JSONObject  attributes,
StatusListener  listener 
)

Set attributes associated with this member.

Parameters
attributesThe new developer-provided attributes for this member.
listenerListener that will receive callback with the result.