Image message body class
EMImageMessageBody body = new EMImageMessageBody(imageFile);
◆ EMImageMessageBody() [1/4]
com.hyphenate.chat.EMImageMessageBody.EMImageMessageBody |
( |
File |
imageFile | ) |
|
Create a image message body
- Parameters
-
◆ EMImageMessageBody() [2/4]
com.hyphenate.chat.EMImageMessageBody.EMImageMessageBody |
( |
Uri |
imageUri | ) |
|
Create a image message body
- Parameters
-
◆ EMImageMessageBody() [3/4]
com.hyphenate.chat.EMImageMessageBody.EMImageMessageBody |
( |
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 |
◆ EMImageMessageBody() [4/4]
com.hyphenate.chat.EMImageMessageBody.EMImageMessageBody |
( |
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 |
◆ getFileName()
String com.hyphenate.chat.EMImageMessageBody.getFileName |
( |
| ) |
|
◆ getFileSize()
long com.hyphenate.chat.EMImageMessageBody.getFileSize |
( |
| ) |
|
Get the image file length
- Returns
- Image file length
◆ getHeight()
int com.hyphenate.chat.EMImageMessageBody.getHeight |
( |
| ) |
|
Get image height
- Returns
- Image height
◆ getThumbnailSecret()
String com.hyphenate.chat.EMImageMessageBody.getThumbnailSecret |
( |
| ) |
|
Get the thumbnail's token
- Returns
- Thumbnail's token
◆ getThumbnailUrl()
String com.hyphenate.chat.EMImageMessageBody.getThumbnailUrl |
( |
| ) |
|
Server url path of thumbnail If has set EMOptions#setAutoDownloadThumbnail(boolean), image receiver will get thumbnail stored under thumbnailRemotePath after a successful download automatically
- Returns
- The thumbnail's remote url
◆ getWidth()
int com.hyphenate.chat.EMImageMessageBody.getWidth |
( |
| ) |
|
Get image width
- Returns
- Image width
◆ isSendOriginalImage()
boolean com.hyphenate.chat.EMImageMessageBody.isSendOriginalImage |
( |
| ) |
|
Get whether to send original image
- Returns
- Whether to send original image
◆ setSendOriginalImage()
void com.hyphenate.chat.EMImageMessageBody.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 |
◆ setThumbnailLocalPath() [1/2]
void com.hyphenate.chat.EMImageMessageBody.setThumbnailLocalPath |
( |
String |
localPath | ) |
|
Set local path of thumbnail
- Parameters
-
localPath | Local path of thumbnail |
◆ setThumbnailLocalPath() [2/2]
void com.hyphenate.chat.EMImageMessageBody.setThumbnailLocalPath |
( |
Uri |
localPath | ) |
|
Set local Uri of thumbnail
- Parameters
-
localPath | Local Uri of thumbnail |
◆ setThumbnailSecret()
void com.hyphenate.chat.EMImageMessageBody.setThumbnailSecret |
( |
String |
secret | ) |
|
Set the thumbnail's token
- Parameters
-
◆ setThumbnailSize()
void com.hyphenate.chat.EMImageMessageBody.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 |
◆ setThumbnailUrl()
void com.hyphenate.chat.EMImageMessageBody.setThumbnailUrl |
( |
String |
thumbnailUrl | ) |
|
Set the thumbnail's remote url
- Parameters
-
thumbnailUrl | The thumbnail's remote url |
◆ thumbnailDownloadStatus()
EMDownloadStatus com.hyphenate.chat.EMImageMessageBody.thumbnailDownloadStatus |
( |
| ) |
|
Get the download status of the thumbnail
- Returns
- EMDownloadStatus
◆ thumbnailLocalPath()
String com.hyphenate.chat.EMImageMessageBody.thumbnailLocalPath |
( |
| ) |
|
Get local path of thumbnail or the String from of Uri
- Returns
- Local path of thumbnail or the String from of Uri
◆ thumbnailLocalUri()
Uri com.hyphenate.chat.EMImageMessageBody.thumbnailLocalUri |
( |
| ) |
|
Get local Uri of image thumbnail
- Returns
- Local Uri of image thumbnail
◆ CREATOR
final Parcelable.Creator<EMImageMessageBody> com.hyphenate.chat.EMImageMessageBody.CREATOR |
|
static |
Initial value:
}
}
}
EMImageMessageBody(File imageFile)
Definition: EMImageMessageBody.java:54
The documentation for this class was generated from the following file:
- hyphenatechatsdk/src/com/hyphenate/chat/EMImageMessageBody.java