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

Public Member Functions

 TextMessageBody (String msg)
 
String getMessage ()
 
void setMessage (String message)
 
void setTargetLanguages (List< String > languageList)
 
List< String > getTargetLanguages ()
 
List< TranslationInfo > getTranslations ()
 
- Public Member Functions inherited from io.agora.chat.MessageBody
long operationTime ()
 
String operatorId ()
 
int operationCount ()
 

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

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