hyphenate_SDK3.0 3.7.6.3
hyphenate java IM SDK
Public 成员函数 | 静态 Public 属性 | 所有成员列表
com.hyphenate.chat.EMImageMessageBody类 参考
类 com.hyphenate.chat.EMImageMessageBody 继承关系图:
com.hyphenate.chat.EMFileMessageBody com.hyphenate.chat.EMMessageBody com.hyphenate.chat.EMBase< EMAMessageBody >

Public 成员函数

 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 成员函数 继承自 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 成员函数 继承自 com.hyphenate.chat.EMBase< EMAMessageBody >
boolean equals (Object o)
 
int hashCode ()
 

静态 Public 属性

static final Parcelable.Creator< EMImageMessageBodyCREATOR
 

额外继承的成员函数

- Protected 属性 继承自 com.hyphenate.chat.EMBase< EMAMessageBody >
emaObject
 

详细描述

图片消息体

EMImageMessageBody body = new EMImageMessageBody(imageFile);

构造及析构函数说明

◆ EMImageMessageBody() [1/4]

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

创建一个图片消息体

参数
imageFile图片文件

◆ EMImageMessageBody() [2/4]

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

创建一个图片消息体

参数
imageUri图片uri

◆ EMImageMessageBody() [3/4]

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

创建一个图片消息体

参数
imageFile图片文件
imageFile缩略图
弃用:
使用 EMImageMessageBody(Uri, Uri)

◆ EMImageMessageBody() [4/4]

com.hyphenate.chat.EMImageMessageBody.EMImageMessageBody ( Uri  imageLocalPath,
Uri  thumbnailPath 
)

创建一个图片消息体

参数
imageLocalPath图片uri
thumbnailPath缩略图uri

成员函数说明

◆ getFileName()

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

获取图片文件名字

返回

重载 com.hyphenate.chat.EMFileMessageBody .

◆ getFileSize()

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

获取文件大小

返回

◆ getHeight()

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

获取图片的高度

返回

◆ getThumbnailUrl()

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

获取缩略图的url 接受消息时,接收方会自动根据thumbnailRemotePath下载缩略图,存储到本地

返回

◆ getWidth()

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

获取图片的宽度

返回

◆ isSendOriginalImage()

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

获取发送图片时,是否发送原图

返回

◆ setSendOriginalImage()

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

设置发送图片时,是否发送原图,默认是发送压缩过后的图(图片超过100k会被压缩)

参数
sendOriginalImage

◆ setThumbnailLocalPath() [1/2]

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

设置缩略图本地路径

◆ setThumbnailLocalPath() [2/2]

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

设置缩略图本地路径

◆ setThumbnailSize()

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

设置缩略图的宽和高

◆ setThumbnailUrl()

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

设置缩略图路径

参数
thumbnailUrl

◆ thumbnailDownloadStatus()

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

获取缩略图的下载状态

返回

◆ thumbnailLocalPath()

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

获取缩略图本地路径或者Uri的String类型

返回

◆ thumbnailLocalUri()

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

获取缩略图本地路径

返回

类成员变量说明

◆ CREATOR

final Parcelable.Creator<EMImageMessageBody> com.hyphenate.chat.EMImageMessageBody.CREATOR
static
初始值:
= 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

该类的文档由以下文件生成: