public class

Text

extends Event
java.lang.Object
   ↳ com.nexmo.sdk.conversation.client.Event
     ↳ com.nexmo.sdk.conversation.client.Text

Class Overview

Send a message to a Conversation and handle activity receipts. The following code example shows how to send a text message to a Conversation:

 conversation.sendText("text", new RequestHandler() {
       @Override
       public void onSuccess(Event text) {
       }

       @Override
       public void onError(NexmoAPIError error) {
       }
   });
 
Events that are sent by other members can be marked as seen:
 text.markAsSeen( new MarkedAsSeenListener() {
       @Override
       public void onMarkedAsSeen(Conversation conversation) {
       }

       @Override
       public void onError(NexmoAPIError error) {
       }
   });
 

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<Text> CREATOR
[Expand]
Inherited Fields
From class com.nexmo.sdk.conversation.client.Event
Public Constructors
Text(String text, Conversation conversation)
Protected Constructors
Text()
Text(String text)
Text(String text, String id, Date timestamp)
Text(String text, String id, Date timestamp, Member member)
Text(String text, String id, Date timestamp, Member member, Conversation conversation)
Text(String text, String id, Date timestamp, Member member, Date deletedTimestamp)
Text(String text, String id, Date timestamp, Member member, Date deletedTimestamp, Conversation conversation)
Text(String text, String id, Date timestamp, Member member, Date deletedTimestamp, Collection<SeenReceipt> seenReceiptList, Collection<DeliveredReceipt> deliveredReceiptList)
Text(String text, String id, Date timestamp, Member member, Conversation conversation, Date deletedTimestamp, Collection<SeenReceipt> seenReceiptList, Collection<DeliveredReceipt> deliveredReceiptList)
Text(Text message)
Text(Parcel in)
Public Methods
int describeContents()
boolean equals(Object o)
static Text fromPush(String senderId, String eventId, JSONObject messageObject)
String getText()
Get the text of this event.
EventType getType()
int hashCode()
String toString()
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class com.nexmo.sdk.conversation.client.Event
From class java.lang.Object
From interface android.os.Parcelable

Fields

public static final Creator<Text> CREATOR

Public Constructors

public Text (String text, Conversation conversation)

Protected Constructors

protected Text ()

protected Text (String text)

protected Text (String text, String id, Date timestamp)

protected Text (String text, String id, Date timestamp, Member member)

protected Text (String text, String id, Date timestamp, Member member, Conversation conversation)

protected Text (String text, String id, Date timestamp, Member member, Date deletedTimestamp)

protected Text (String text, String id, Date timestamp, Member member, Date deletedTimestamp, Conversation conversation)

protected Text (String text, String id, Date timestamp, Member member, Date deletedTimestamp, Collection<SeenReceipt> seenReceiptList, Collection<DeliveredReceipt> deliveredReceiptList)

protected Text (String text, String id, Date timestamp, Member member, Conversation conversation, Date deletedTimestamp, Collection<SeenReceipt> seenReceiptList, Collection<DeliveredReceipt> deliveredReceiptList)

protected Text (Text message)

protected Text (Parcel in)

Public Methods

public int describeContents ()

public boolean equals (Object o)

public static Text fromPush (String senderId, String eventId, JSONObject messageObject)

Throws
JSONException

public String getText ()

Get the text of this event. For images text is not provided.

Returns
  • The text text.

public EventType getType ()

public int hashCode ()

public String toString ()

public void writeToParcel (Parcel dest, int flags)