Chat SDK for Android v1.1.0
agora java chat SDK
Classes | Public Member Functions | Static Public Attributes | List of all members
io.agora.chat.TextMessageBody Class Reference
Inheritance diagram for io.agora.chat.TextMessageBody:
io.agora.chat.MessageBody

Classes

class  TranslationInfo
 

Public Member Functions

 TextMessageBody (String msg)
 
String getMessage ()
 
void setMessage (String message)
 
String toString ()
 
int describeContents ()
 
void writeToParcel (Parcel dest, int flags)
 
void setTargetLanguages (List< String > languageList)
 
List< String > getTargetLanguages ()
 
List< TranslationInfo > getTranslations ()
 

Static Public Attributes

static final Parcelable.Creator< TextMessageBodyCREATOR
 

Detailed Description

The text message body.

TextMessageBody body = new TextMessageBody("hello hyphenate chat sdk!");
TextMessageBody(String msg)
Definition: TextMessageBody.java:51

Constructor & Destructor Documentation

◆ TextMessageBody()

io.agora.chat.TextMessageBody.TextMessageBody ( String  msg)

Creates a text message body.

Parameters
msgThe text content.

Member Function Documentation

◆ getMessage()

String io.agora.chat.TextMessageBody.getMessage ( )

Gets the text message body.

Returns
The text content.

◆ getTargetLanguages()

List< String > io.agora.chat.TextMessageBody.getTargetLanguages ( )

Get the target language for translation

Returns
Language code list

◆ getTranslations()

List< TranslationInfo > io.agora.chat.TextMessageBody.getTranslations ( )

Get the translation list

Returns
Translation information list

◆ setMessage()

void io.agora.chat.TextMessageBody.setMessage ( String  message)

Sets the text message body's content. @Note: you can only modify the local data.

Parameters
messageThe text content.

◆ setTargetLanguages()

void io.agora.chat.TextMessageBody.setTargetLanguages ( List< String >  languageList)

Set the target language for translation

Parameters
languageListLanguage code list

Member Data Documentation

◆ CREATOR

final Parcelable.Creator<TextMessageBody> io.agora.chat.TextMessageBody.CREATOR
static
Initial value:
= new Parcelable.Creator<TextMessageBody>() {
public TextMessageBody createFromParcel(Parcel in) {
return new TextMessageBody(in);
}
public TextMessageBody[] newArray(int size) {
return new TextMessageBody[size];
}
}

The documentation for this class was generated from the following file: