Releases: jpush/aurora-imui
Releases · jpush/aurora-imui
Modify API
Change Log
Android
- MessageList release 0.4.7
OnMsgResendListener
更名为OnMsgStatusViewClickListener
, 同时,接收方语音消息增加此事件回调,将消息状态设置为RECEIVE_FAILED
, 会出现一个状态按钮,按钮的点击事件会回调onStatusViewClick
.
使用方式:
mAdapter.setMsgStatusViewClickListener(new MsgListAdapter.OnMsgStatusViewClickListener<MyMessage>() {
@Override
public void onStatusViewClick(MyMessage message) {
// message status view click, resend or download here
}
});
Android
- MessageList release 0.4.7
RenameOnMsgResendListener
toOnMsgStatusViewClickListener
, meanwhile, VoiceViewHolder add receive failed event, when you set VoiceMessage's state toRECEIVE_FAILED
, the message status view will show up, and which's click event will invokeonStatusViewClick
.
usage:
mAdapter.setMsgStatusViewClickListener(new MsgListAdapter.OnMsgStatusViewClickListener<MyMessage>() {
@Override
public void onStatusViewClick(MyMessage message) {
// message status view click, resend or download here
}
});
Fix Bug
v0.4.12 Release
Change Log
React Native
API Change
Before:
const AuroraIMUIController = NativeModules.AuroraIMUIModule
Now:
import IMUI from 'aurora-imui-react-native'
const AuroraIMUIController = IMUI.AuroraIMUIController
and you can refer to aurora-imui-react-native/index.js
file for more detail.
New API
- addMessageListDidLoadListener(callback: Function)
add listener to get MessageListDidLoad event - removeMessageListDidLoadListener(callback: Function)
remove listener
API Change
Change Log
Android
MessageList
- Move
setAudioPlayByEarPhone
andpauseVoice
toMsgListAdapter
ChatInput
- Change return type of
switchToMicrophoneMode
,switchToGalleryMode
,switchToCameraMode
toboolean
.
New Feature & Fix Bug
Change Log
Common
- Android, iOS 添加头像圆角属性
-
Android 使用方式:
<cn.jiguang.imui.messages.MessageList ... app:avatarRadius="5dp"/>
-
iOS 用法:
IMUIBaseMessageCell.avatarCornerRadius = 4
-
React Native
可以配置 messageList 的 avatarCornerRadius 属性来设置圆角
avatarCornerRadius: PropTypes.number — Example: avatarCornerRadius = {6}
IMUI.ChatInput 的成功录音回调 onFinishRecordVoice
回调两个参数,音频文件路径和音频文件时长。
onFinishRecordVoice = (mediaPath, duration) => {} // 具体用法参考 demo
Fix bug
v0.4.7 Release
Change Log
iOS 、Android
iOS 、 Android 录音格式统一改成m4a
Android 最新版本号为 0.4.4:
compile 'cn.jiguang.imui:chatinput:0.4.4'
compile 'cn.jiguang.imui:messagelist:0.4.4'
Optimize & Add API & Fix Bug
v0.4.0 Release
Change Log
Android
- fix #52
- Message type add SEND_CUSTOM & RECEIVE_CUSTOM
- ChatInputView add Interface:
OnClickEditTextListener
usage:
mChatInput.setOnClickEditTextListener(new OnClickEditTextListener() {
@Override
public void onTouchEditText() {
// do something
}
});
iOS
- surport custom Message
v0.3.0 surpport React Native
- surpport React Native
- iOS Adaptate Objective-C Refer to this demo
v0.2.0 新功能 & 修复 bug
更新日志
Android:
新功能:
- 增加消息状态(发送中进度条可以自定义样式)
- Android 使用方法:
// MyMessage implements IMessage
MyMessage message = new MyMessage();
mAdapter.addToStart(message, true);
// 类似的发送状态监听方法
message.onSendMessageComplete(new Callback callback) {
@Override
public void getResult() {
// 调用 updateMessage,告知 adapter 刷新状态即可
mAdapter.updateMessage(message);
}
}
- 增加重新发送接口 (fix #11)
- Android 使用方法
mAdapter.setMsgResendListener(new MsgListAdapter.OnMsgResendListener<MyMessage>() {
@Override
public void onMessageResend(MyMessage message) {
// resend message here
}
});
iOS:
- Add API:
- update message cell (you can use this function to update message's status or replace this message,this function will replace message by msgid):
updateMessage(with message:IMUIMessageModel)
Usage:
// example:
let model = messageCollectionView[messageCollectionView.messageCount - 1]
// or : let model = messageCollectionView["yourMsgid"]
model.messageStatus = .success
messageCollectionView.updateMessage(with: model)