Image message body class
EMImageMessageBody body = new EMImageMessageBody(imageFile);
com.hyphenate.chat.EMImageMessageBody.EMImageMessageBody |
( |
File |
imageFile | ) |
|
Create a image message body
- Parameters
-
com.hyphenate.chat.EMImageMessageBody.EMImageMessageBody |
( |
Uri |
imageUri | ) |
|
Create a image message body
- Parameters
-
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 |
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 |
String com.hyphenate.chat.EMImageMessageBody.getFileName |
( |
| ) |
|
Get image file name
- Returns
- Image file name
long com.hyphenate.chat.EMImageMessageBody.getFileSize |
( |
| ) |
|
Get the image file length
- Returns
- Image file length
int com.hyphenate.chat.EMImageMessageBody.getHeight |
( |
| ) |
|
Get image height
- Returns
- Image height
String com.hyphenate.chat.EMImageMessageBody.getThumbnailSecret |
( |
| ) |
|
Get the thumbnail's token
- Returns
- Thumbnail's token
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
int com.hyphenate.chat.EMImageMessageBody.getWidth |
( |
| ) |
|
Get image width
- Returns
- Image width
boolean com.hyphenate.chat.EMImageMessageBody.isSendOriginalImage |
( |
| ) |
|
Get whether to send original image
- Returns
- Whether to send original image
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 |
void com.hyphenate.chat.EMImageMessageBody.setThumbnailLocalPath |
( |
String |
localPath | ) |
|
Set local path of thumbnail
- Parameters
-
localPath | Local path of thumbnail |
void com.hyphenate.chat.EMImageMessageBody.setThumbnailLocalPath |
( |
Uri |
localPath | ) |
|
Set local Uri of thumbnail
- Parameters
-
localPath | Local Uri of thumbnail |
void com.hyphenate.chat.EMImageMessageBody.setThumbnailSecret |
( |
String |
secret | ) |
|
Set the thumbnail's token
- Parameters
-
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 |
void com.hyphenate.chat.EMImageMessageBody.setThumbnailUrl |
( |
String |
thumbnailUrl | ) |
|
Set the thumbnail's remote url
- Parameters
-
thumbnailUrl | The thumbnail's remote url |
EMDownloadStatus com.hyphenate.chat.EMImageMessageBody.thumbnailDownloadStatus |
( |
| ) |
|
Get the download status of the thumbnail
- Returns
- EMDownloadStatus
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
Uri com.hyphenate.chat.EMImageMessageBody.thumbnailLocalUri |
( |
| ) |
|
Get local Uri of image thumbnail
- Returns
- Local Uri of image thumbnail
final Parcelable.Creator<EMImageMessageBody> com.hyphenate.chat.EMImageMessageBody.CREATOR |
|
static |
The documentation for this class was generated from the following file:
- hyphenatechatsdk/src/com/hyphenate/chat/EMImageMessageBody.java