public class NexmoSeenEvent extends NexmoEvent
Represents a seen receipt for an event, available for NexmoTextEvent
and NexmoAttachmentEvent
.
conversation.addMessageEventListener(new NexmoMessageEventListener() { @Override public void onTextEvent(@NonNull NexmoTextEvent textEvent) {} @Override public void onAttachmentEvent(@NonNull NexmoAttachmentEvent attachmentEvent) {} @Override public void onEventDeleted(@NonNull NexmoDeletedEvent deletedEvent) {} @Override public void onSeenReceipt(@NonNull NexmoSeenEvent seenEvent) { String userName = seenEvent.getFromMember().getUser().getName(); Log.d("onSeenReceipt", "Event " + seenEvent.initialEventId() + "seen by User " + userName); } @Override public void onDeliveredReceipt(@NonNull NexmoDeliveredEvent deliveredEvent) {} @Override public void onTypingEvent(@NonNull NexmoTypingEvent typingEvent) {} });
Retrieve seen events from conversation:
conversation.getEvents(100, NexmoPageOrder.NexmoMPageOrderAsc, null, new NexmoRequestListener() { @Override public void onSuccess(@Nullable NexmoEventsPage eventsPage) { for (NexmoEvent event : eventsPage.getData()) { if (event instanceof NexmoSeenEvent) { // seen event } } } @Override public void onError(@NonNull NexmoApiError apiError) { } });
Modifier and Type | Field and Description |
---|---|
static android.os.Parcelable.Creator<NexmoSeenEvent> |
CREATOR |
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
java.lang.Integer |
initialEventId()
Gets the Event for which this Seen Receipt has been emitted.
|
java.lang.String |
toString() |
void |
writeToParcel(android.os.Parcel dest,
int flags) |
getConversation, getConversationId, getCreationDate, getEmbeddedInfo, getEventType, getFromMemberId, getId, markEventState, updateEventState
public static final android.os.Parcelable.Creator<NexmoSeenEvent> CREATOR
public final java.lang.Integer initialEventId()
public java.lang.String toString()
toString
in class NexmoEvent
public boolean equals(java.lang.Object o)
equals
in class NexmoEvent
public int hashCode()
hashCode
in class NexmoEvent
public int describeContents()
describeContents
in interface android.os.Parcelable
describeContents
in class NexmoEvent
public void writeToParcel(android.os.Parcel dest, int flags)
writeToParcel
in interface android.os.Parcelable
writeToParcel
in class NexmoEvent