hyphenate_SDK3.0  3.6.2
hyphenatejavaIMSDK
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 (File imageFile, File thumbnailFile)
 
 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 ()
 
String thumbnailLocalPath ()
 
void setThumbnailLocalPath (String localPath)
 
void setThumbnailSize (int width, int height)
 
EMDownloadStatus thumbnailDownloadStatus ()
 
- Public Member Functions inherited from com.hyphenate.chat.EMFileMessageBody
 EMFileMessageBody (String localPath)
 
 EMFileMessageBody (EMAFileMessageBody body)
 
String getFileName ()
 
void setFileName (String fileName)
 
String getLocalUrl ()
 
void setLocalUrl (String 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

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

create a image message body

Parameters
imageFilethe image file
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

Member Function Documentation

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

get image file name

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

get image height

Returns
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
int com.hyphenate.chat.EMImageMessageBody.getWidth ( )

get image width

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

get whether send original image

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
void com.hyphenate.chat.EMImageMessageBody.setThumbnailLocalPath ( String  localPath)

set local path of thumbnail

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

set the width and height of the thumbnail image

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

set the thumbnail url

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

get the download status of the thumbnail

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

get local path of thumbnail

Returns

Member Data Documentation

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];
}
}

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