|
hyphenate_SDK3.0
3.1.4
hyphenatejavaIMSDK
|
Classes | |
| enum | ChatType |
| enum | Direct |
| enum | Status |
| enum | Type |
Public Member Functions | |
| Status | status () |
| EMMessage (EMAMessage message) | |
| void | setStatus (Status status) |
| Type | getType () |
| EMMessageBody | getBody () |
| long | getMsgTime () |
| void | setMsgTime (long msgTime) |
| long | localTime () |
| void | setLocalTime (long serverTime) |
| void | addBody (EMMessageBody body) |
| String | getFrom () |
| void | setFrom (String from) |
| void | setTo (String to) |
| String | getTo () |
| String | getMsgId () |
| void | setMsgId (String msgId) |
| void | setReceipt (String username) |
| void | setMessageStatusCallback (EMCallBack callback) |
| String | toString () |
| void | setAttribute (String attribute, boolean value) |
| void | setAttribute (String attribute, int value) |
| void | setAttribute (String attribute, long value) |
| void | setAttribute (String attribute, JSONObject json) |
| void | setAttribute (String attribute, JSONArray json) |
| void | setAttribute (String attribute, String value) |
| boolean | getBooleanAttribute (String attribute) throws HyphenateException |
| boolean | getBooleanAttribute (String attribute, boolean defaultValue) |
| int | getIntAttribute (String attribute, int defaultValue) |
| long | getLongAttribute (String attribute, long defaultValue) |
| int | getIntAttribute (String attribute) throws HyphenateException |
| long | getLongAttribute (String attribute) throws HyphenateException |
| String | getStringAttribute (String attribute) throws HyphenateException |
| String | getStringAttribute (String attribute, String defaultValue) |
| JSONObject | getJSONObjectAttribute (String attribute) throws HyphenateException |
| JSONArray | getJSONArrayAttribute (String attribute) throws HyphenateException |
| ChatType | getChatType () |
| void | setChatType (ChatType chatType) |
| int | describeContents () |
| void | writeToParcel (Parcel out, int flags) |
| Object | clone () throws CloneNotSupportedException |
| boolean | isAcked () |
| void | setAcked (boolean isAcked) |
| boolean | isDelivered () |
| void | setDelivered (boolean isDelivered) |
| boolean | isUnread () |
| void | setUnread (boolean unread) |
| boolean | isListened () |
| void | setListened (boolean isListened) |
| String | getUserName () |
| int | getError () |
| void | setDeliverAcked (boolean isDeliverAcked) |
| int | progress () |
| Direct | direct () |
| void | setDirection (Direct dir) |
Static Public Member Functions | |
| static EMMessage | createSendMessage (Type type) |
| static EMMessage | createReceiveMessage (Type type) |
| static EMMessage | createTxtSendMessage (String content, String username) |
| static EMMessage | createVoiceSendMessage (String filePath, int timeLength, String username) |
| static EMMessage | createImageSendMessage (String filePath, boolean sendOriginalImage, String username) |
| static EMMessage | createVideoSendMessage (String videofilePath, String imageThumbPath, int timeLength, String username) |
| static EMMessage | createLocationSendMessage (double latitude, double longitude, String locationAddress, String username) |
| static EMMessage | createFileSendMessage (String filePath, String username) |
Static Public Attributes | |
| static final Parcelable.Creator< EMMessage > | CREATOR |
represent a sent/recv message
construct a new send text message
EMMessage msg = EMMessage.createSendMessage(EMMessage.Type.TXT);
msg.setReceipt("user1");
TextMessageBody body = new TextMessageBody("hello from hyphenate sdk");
msg.addBody(body);
construct a new recv text message
EMMessage msg = EMMessage.createSendMessage(EMMessage.Type.IMAGE);
msg.setReceipt("user1");
ImageMessageBody body = new ImageMessageBody(imageFileUrl);
msg.addBody(body);
| void com.hyphenate.chat.EMMessage.addBody | ( | EMMessageBody | body | ) |
add a message body,only support add one now
| body | the message body |
|
static |
create a normal file send message
| filePath | the path of the file |
| username | the recipient id |
|
static |
create a image send message
| filePath | the path of the image |
| sendOriginalImage | whether to send the original(if image greater than 100k sdk will be compressed) |
| username | the recipient id |
|
static |
create a location send message
| latitude | the latitude |
| longitude | the longitude |
| locationAddress | location details |
| username | the recipient id |
create a new recv message
| type | message type |
create a new send message
| type | the message type |
|
static |
| content | text content |
| username | the recipient(user or group) id |
|
static |
create a video send message
| videofilePath | the path of the video file |
| imageThumbPath | the path of the thumbnail |
| timeLength | the length of the video time, unit s |
| username | the recipient id |
|
static |
create a voice send message
| filePath | the path of the voice file |
| timeLength | the time length of the voice(unit s) |
| username | the recipient id |
| Direct com.hyphenate.chat.EMMessage.direct | ( | ) |
the message direction
| EMMessageBody com.hyphenate.chat.EMMessage.getBody | ( | ) |
get message body
| boolean com.hyphenate.chat.EMMessage.getBooleanAttribute | ( | String | attribute | ) | throws HyphenateException |
get a boolean type extra attribute
| attribute | the attribute name return |
| HyphenateException |
| boolean com.hyphenate.chat.EMMessage.getBooleanAttribute | ( | String | attribute, |
| boolean | defaultValue | ||
| ) |
get a boolean type extra attribute
| attribute | the attribute name |
| defaultValue | the default value you want |
| int com.hyphenate.chat.EMMessage.getError | ( | ) |
get the error
| String com.hyphenate.chat.EMMessage.getFrom | ( | ) |
get the sender id
| int com.hyphenate.chat.EMMessage.getIntAttribute | ( | String | attribute, |
| int | defaultValue | ||
| ) |
get a int type extra attribute
| attribute | the attribute name |
| defaultValue | the default value you want |
| int com.hyphenate.chat.EMMessage.getIntAttribute | ( | String | attribute | ) | throws HyphenateException |
get a int type extra attribute
| attribute | the attribute name |
| defaultValue | the default value you want |
| HyphenateException |
| JSONArray com.hyphenate.chat.EMMessage.getJSONArrayAttribute | ( | String | attribute | ) | throws HyphenateException |
get a jsonarray type attribute
| the | attribute name |
| HyphenateException |
| JSONObject com.hyphenate.chat.EMMessage.getJSONObjectAttribute | ( | String | attribute | ) | throws HyphenateException |
get a jsonobject type attribute
| the | attribute name |
| HyphenateException |
| long com.hyphenate.chat.EMMessage.getLongAttribute | ( | String | attribute, |
| long | defaultValue | ||
| ) |
get a long type extra attribute
| attribute | the attribute name |
| defaultValue | the default value you want |
| long com.hyphenate.chat.EMMessage.getLongAttribute | ( | String | attribute | ) | throws HyphenateException |
get long type extra attribute
| attribute | the attribute name |
| defaultValue | the default value you want |
| HyphenateException |
| String com.hyphenate.chat.EMMessage.getMsgId | ( | ) |
get message id
| long com.hyphenate.chat.EMMessage.getMsgTime | ( | ) |
get message time stamp(server time)
| String com.hyphenate.chat.EMMessage.getStringAttribute | ( | String | attribute | ) | throws HyphenateException |
get a string type extra attribute
| attribute | the attribute name |
| defaultValue | the default value you want |
| HyphenateException |
| String com.hyphenate.chat.EMMessage.getStringAttribute | ( | String | attribute, |
| String | defaultValue | ||
| ) |
get a string type extra attribute
| attribute | the attribute name |
| defaultValue | the default value you want |
| String com.hyphenate.chat.EMMessage.getTo | ( | ) |
get receiver name
| Type com.hyphenate.chat.EMMessage.getType | ( | ) |
获取消息类型
get message chat type
| String com.hyphenate.chat.EMMessage.getUserName | ( | ) |
get the peer's id
| boolean com.hyphenate.chat.EMMessage.isAcked | ( | ) |
Read Ack
| boolean com.hyphenate.chat.EMMessage.isDelivered | ( | ) |
Delivery Ack, check if the peer has received the message
| boolean com.hyphenate.chat.EMMessage.isListened | ( | ) |
get whether the message is listen
| boolean com.hyphenate.chat.EMMessage.isUnread | ( | ) |
unread flag
| long com.hyphenate.chat.EMMessage.localTime | ( | ) |
get local receive time
| void com.hyphenate.chat.EMMessage.setAcked | ( | boolean | isAcked | ) |
Sets whether the other has been read, not suppposed to be called by app
| void com.hyphenate.chat.EMMessage.setAttribute | ( | String | attribute, |
| boolean | value | ||
| ) |
set a boolean type extra attributes of the message
| attribute | attribute key |
| value | attribute value |
| void com.hyphenate.chat.EMMessage.setAttribute | ( | String | attribute, |
| int | value | ||
| ) |
set a int type extra attributes of the message
| attribute | attribute key |
| value | attribute value |
| void com.hyphenate.chat.EMMessage.setAttribute | ( | String | attribute, |
| long | value | ||
| ) |
set a long type extra attributes of the message
| attribute | attribute key |
| value | attribute value |
| void com.hyphenate.chat.EMMessage.setAttribute | ( | String | attribute, |
| JSONObject | json | ||
| ) |
set a jsonobject type extra attributes of the message
| attribute | attribute key |
| value | attribute value |
| void com.hyphenate.chat.EMMessage.setAttribute | ( | String | attribute, |
| JSONArray | json | ||
| ) |
set a jsonarray type extra attributes of the message
| attribute | attribute key |
| value | attribute value |
| void com.hyphenate.chat.EMMessage.setAttribute | ( | String | attribute, |
| String | value | ||
| ) |
set a string type extra attributes of the message
| attribute | attribute key |
| value | attribute value |
| void com.hyphenate.chat.EMMessage.setChatType | ( | ChatType | chatType | ) |
| void com.hyphenate.chat.EMMessage.setDirection | ( | Direct | dir | ) |
set message direction
| dir |
| void com.hyphenate.chat.EMMessage.setFrom | ( | String | from | ) |
set sender id
| from |
| void com.hyphenate.chat.EMMessage.setListened | ( | boolean | isListened | ) |
Sets whether the other has been listen
| isListened |
| void com.hyphenate.chat.EMMessage.setLocalTime | ( | long | serverTime | ) |
set message local receive time
| server | time |
| void com.hyphenate.chat.EMMessage.setMessageStatusCallback | ( | EMCallBack | callback | ) |
set message status callback, your app should set emaObject callback to get message status and then refesh the ui accordingly
| callBack |
| void com.hyphenate.chat.EMMessage.setMsgId | ( | String | msgId | ) |
set local message id
| msgId |
| void com.hyphenate.chat.EMMessage.setMsgTime | ( | long | msgTime | ) |
set message time stamp(server time)
| msgTime |
| void com.hyphenate.chat.EMMessage.setReceipt | ( | String | username | ) |
set the message receiver
| username |
| void com.hyphenate.chat.EMMessage.setStatus | ( | Status | status | ) |
set the status of the message
| void com.hyphenate.chat.EMMessage.setTo | ( | String | to | ) |
set receiver name
| to |
| Status com.hyphenate.chat.EMMessage.status | ( | ) |
message status
|
static |
1.8.9.1