hyphenate_SDK3.0 3.7.6.3
hyphenate java IM SDK
Public Member Functions | Static Public Attributes | List of all members
com.hyphenate.chat.EMImageMessageBody Class Reference
Inheritance diagram for com.hyphenate.chat.EMImageMessageBody:
com.hyphenate.chat.EMFileMessageBody com.hyphenate.chat.EMMessageBody com.hyphenate.chat.EMBase< EMAMessageBody >

Public Member Functions

 EMImageMessageBody (File imageFile)
 
 EMImageMessageBody (Uri imageUri)
 
 EMImageMessageBody (File imageFile, File thumbnailFile)
 
 EMImageMessageBody (Uri imageLocalPath, Uri thumbnailPath)
 
 EMImageMessageBody (EMAImageMessageBody body)
 
String getThumbnailUrl ()
 
void setThumbnailUrl (String thumbnailUrl)
 
String toString ()
 
int describeContents ()
 
void writeToParcel (Parcel dest, int flags)
 
void setThumbnailSecret (String secret)
 
String getThumbnailSecret ()
 
void setSendOriginalImage (boolean sendOriginalImage)
 
boolean isSendOriginalImage ()
 
int getWidth ()
 
int getHeight ()
 
String getFileName ()
 
long getFileSize ()
 
String thumbnailLocalPath ()
 
Uri thumbnailLocalUri ()
 
void setThumbnailLocalPath (String localPath)
 
void setThumbnailLocalPath (Uri localPath)
 
void setThumbnailSize (int width, int height)
 
EMDownloadStatus thumbnailDownloadStatus ()
 
- Public Member Functions inherited from com.hyphenate.chat.EMFileMessageBody
 EMFileMessageBody (String localPath)
 
 EMFileMessageBody (Uri localPath)
 
 EMFileMessageBody (EMAFileMessageBody body)
 
void setFileName (String fileName)
 
String getLocalUrl ()
 
void setLocalUrl (String localUrl)
 
Uri getLocalUri ()
 
void setLocalUrl (Uri localUrl)
 
String getRemoteUrl ()
 
void setRemoteUrl (String remoteUrl)
 
void setSecret (String secret)
 
String getSecret ()
 
String displayName ()
 
void setFileLength (long length)
 
EMDownloadStatus downloadStatus ()
 
void setDownloadStatus (EMDownloadStatus status)
 
- Public Member Functions inherited from com.hyphenate.chat.EMBase< EMAMessageBody >
boolean equals (Object o)
 
int hashCode ()
 

Static Public Attributes

static final Parcelable.Creator< EMImageMessageBodyCREATOR
 

Additional Inherited Members

- Protected Attributes inherited from com.hyphenate.chat.EMBase< EMAMessageBody >
emaObject
 

Detailed Description

the image message body class

EMImageMessageBody body = new EMImageMessageBody(imageFile);

Constructor & Destructor Documentation

◆ EMImageMessageBody() [1/4]

com.hyphenate.chat.EMImageMessageBody.EMImageMessageBody ( File  imageFile)

create a image message body

Parameters
imageFilethe image file

◆ EMImageMessageBody() [2/4]

com.hyphenate.chat.EMImageMessageBody.EMImageMessageBody ( Uri  imageUri)

create a image message body

Parameters
imageUrithe image uri

◆ EMImageMessageBody() [3/4]

com.hyphenate.chat.EMImageMessageBody.EMImageMessageBody ( File  imageFile,
File  thumbnailFile 
)

create a image message body with original image, but also upload thumbnail to server

Parameters
imageFilethe original image file
thumbnailFilethe thumbnail image file
Deprecated:
Use EMImageMessageBody(Uri, Uri)

◆ 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
imageLocalPaththe original image uri
thumbnailPaththe thumbnail image uri

Member Function Documentation

◆ getFileName()

String com.hyphenate.chat.EMImageMessageBody.getFileName ( )

get image file name

Returns

Reimplemented from com.hyphenate.chat.EMFileMessageBody.

◆ getFileSize()

long com.hyphenate.chat.EMImageMessageBody.getFileSize ( )

get the video file size

Returns

◆ getHeight()

int com.hyphenate.chat.EMImageMessageBody.getHeight ( )

get image height

Returns

◆ getThumbnailUrl()

String com.hyphenate.chat.EMImageMessageBody.getThumbnailUrl ( )

Server url path of thumbnail Image receiver will get thumbnail stored under thumbnailRemotePath after a successful download automatically.

Returns

◆ getWidth()

int com.hyphenate.chat.EMImageMessageBody.getWidth ( )

get image width

Returns

◆ isSendOriginalImage()

boolean com.hyphenate.chat.EMImageMessageBody.isSendOriginalImage ( )

get whether send original image

◆ setSendOriginalImage()

void com.hyphenate.chat.EMImageMessageBody.setSendOriginalImage ( boolean  sendOriginalImage)

set whether 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

◆ setThumbnailLocalPath() [1/2]

void com.hyphenate.chat.EMImageMessageBody.setThumbnailLocalPath ( String  localPath)

set local path of thumbnail

◆ setThumbnailLocalPath() [2/2]

void com.hyphenate.chat.EMImageMessageBody.setThumbnailLocalPath ( Uri  localPath)

set local path of thumbnail

◆ setThumbnailSize()

void com.hyphenate.chat.EMImageMessageBody.setThumbnailSize ( int  width,
int  height 
)

set the width and height of the thumbnail image

◆ setThumbnailUrl()

void com.hyphenate.chat.EMImageMessageBody.setThumbnailUrl ( String  thumbnailUrl)

set the thumbnail url

Parameters
thumbnailUrl

◆ thumbnailDownloadStatus()

EMDownloadStatus com.hyphenate.chat.EMImageMessageBody.thumbnailDownloadStatus ( )

get the download status of the thumbnail

Returns

◆ thumbnailLocalPath()

String com.hyphenate.chat.EMImageMessageBody.thumbnailLocalPath ( )

get local path of thumbnail or the String style of Uri

Returns

◆ thumbnailLocalUri()

Uri com.hyphenate.chat.EMImageMessageBody.thumbnailLocalUri ( )

get local path of thumbnail

Returns

Member Data Documentation

◆ CREATOR

final Parcelable.Creator<EMImageMessageBody> com.hyphenate.chat.EMImageMessageBody.CREATOR
static
Initial value:
= new Parcelable.Creator<EMImageMessageBody>() {
public EMImageMessageBody createFromParcel(Parcel in) {
return new EMImageMessageBody(in);
}
public EMImageMessageBody[] newArray(int size) {
return new EMImageMessageBody[size];
}
}
EMImageMessageBody(File imageFile)
Definition: EMImageMessageBody.java:55

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