Image message body class
ImageMessageBody body = new ImageMessageBody(imageFile);
| io.agora.chat.ImageMessageBody.ImageMessageBody |
( |
File |
imageFile | ) |
|
Create a image message body
- Parameters
-
| io.agora.chat.ImageMessageBody.ImageMessageBody |
( |
Uri |
imageUri | ) |
|
Create a image message body
- Parameters
-
| io.agora.chat.ImageMessageBody.ImageMessageBody |
( |
File |
imageFile, |
|
|
File |
thumbnailFile |
|
) |
| |
Create a image message body with original image, and also upload thumbnail to server
- Parameters
-
| imageFile | The original image file |
| thumbnailFile | The thumbnail image file |
| io.agora.chat.ImageMessageBody.ImageMessageBody |
( |
Uri |
imageLocalPath, |
|
|
Uri |
thumbnailPath |
|
) |
| |
create a image message body with original image, but also upload thumbnail to server
- Parameters
-
| imageLocalPath | The original image uri |
| thumbnailPath | The thumbnail image uri |
| String io.agora.chat.ImageMessageBody.getFileName |
( |
| ) |
|
Get image file name
- Returns
- Image file name
| long io.agora.chat.ImageMessageBody.getFileSize |
( |
| ) |
|
Get the image file length
- Returns
- Image file length
| int io.agora.chat.ImageMessageBody.getHeight |
( |
| ) |
|
Get image height
- Returns
- Image height
| String io.agora.chat.ImageMessageBody.getThumbnailSecret |
( |
| ) |
|
Get the thumbnail's token
- Returns
- Thumbnail's token
| String io.agora.chat.ImageMessageBody.getThumbnailUrl |
( |
| ) |
|
Server url path of thumbnail If has set ChatOptions#setAutoDownloadThumbnail(boolean), image receiver will get thumbnail stored under thumbnailRemotePath after a successful download automatically
- Returns
- The thumbnail's remote url
| int io.agora.chat.ImageMessageBody.getWidth |
( |
| ) |
|
Get image width
- Returns
- Image width
| boolean io.agora.chat.ImageMessageBody.isSendOriginalImage |
( |
| ) |
|
Get whether to send original image
- Returns
- Whether to send original image
| void io.agora.chat.ImageMessageBody.setSendOriginalImage |
( |
boolean |
sendOriginalImage | ) |
|
Set whether to send original image when sending image, the default is to send the figure after the compression(image greater than 100k will be compress)
- Parameters
-
| sendOriginalImage | Whether to send original image |
| void io.agora.chat.ImageMessageBody.setThumbnailLocalPath |
( |
String |
localPath | ) |
|
Set local path of thumbnail
- Parameters
-
| localPath | Local path of thumbnail |
| void io.agora.chat.ImageMessageBody.setThumbnailLocalPath |
( |
Uri |
localPath | ) |
|
Set local Uri of thumbnail
- Parameters
-
| localPath | Local Uri of thumbnail |
| void io.agora.chat.ImageMessageBody.setThumbnailSecret |
( |
String |
secret | ) |
|
Set the thumbnail's token
- Parameters
-
| void io.agora.chat.ImageMessageBody.setThumbnailSize |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
Set the width and height of the thumbnail image
- Parameters
-
| width | The width of thumbnail |
| height | The height of thumbnail |
| void io.agora.chat.ImageMessageBody.setThumbnailUrl |
( |
String |
thumbnailUrl | ) |
|
Set the thumbnail's remote url
- Parameters
-
| thumbnailUrl | The thumbnail's remote url |
Get the download status of the thumbnail
- Returns
- EMDownloadStatus
| String io.agora.chat.ImageMessageBody.thumbnailLocalPath |
( |
| ) |
|
Get local path of thumbnail or the String from of Uri
- Returns
- Local path of thumbnail or the String from of Uri
| Uri io.agora.chat.ImageMessageBody.thumbnailLocalUri |
( |
| ) |
|
Get local Uri of image thumbnail
- Returns
- Local Uri of image thumbnail
| final Parcelable.Creator<ImageMessageBody> io.agora.chat.ImageMessageBody.CREATOR |
|
static |
The documentation for this class was generated from the following file:
- hyphenatechatsdk/src/io/agora/chat/ImageMessageBody.java