public class IMChattingPageOperateion
extends BaseAdvice
| Constructor and Description |
|---|
IMChattingPageOperateion(Pointcut pointcut) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
enableDoubleClickEnlargeMessageText(Fragment fragment) |
ReplyBarItem |
getCustomAlbumReplyBarItem()
Deprecated.
|
View |
getCustomGeoMessageView(Fragment fragment,
YWMessage message)
Deprecated.
|
View |
getCustomMessageView(Fragment fragment,
YWMessage message)
Deprecated.
|
View |
getCustomMessageViewWithoutHead(Fragment fragment,
YWMessage message,
YWConversation conversation)
Deprecated.
|
ReplyBarItem |
getCustomPhotoReplyBarItem()
Deprecated.
|
java.util.List<ReplyBarItem> |
getCustomReplyBarItemList(Fragment pointcut,
YWConversation ywConversation,
java.util.List<ReplyBarItem> replyBarItemList)
获取用户定制的聊天窗口回复栏内的item列表
|
java.lang.String |
getCustomTimeString(Fragment fragment,
YWConversation conversation,
java.lang.String time)
自定义时间文案
|
View |
getCustomUrlView(Fragment fragment,
YWMessage message,
java.lang.String url,
YWConversation ywConversation)
获取url对应的自定义view,当openIM发送或者接收到url消息时会回调该方法获取该url的自定义view。若开发者实现了该方法并且返回了一个view对象,openIM将会使用该view展示对应的url消息。
|
View |
getCustomView(Fragment fragment,
YWMessage message,
View convertView,
int viewType,
YWContactHeadLoadHelper headLoadHelper)
根据viewType获取自定义view
|
int |
getCustomViewType(YWMessage message)
当前消息对应的自定义view类型
|
int |
getCustomViewTypeCount()
自定义消息view种类数
|
int |
getFastReplyResId(YWConversation conversation)
NOT FOR OPENIM
|
GoodsInfo |
getGoodsInfoFromUrl(Fragment fragment,
YWMessage message,
java.lang.String url,
YWConversation ywConversation)
获取url对应的商品详情信息,当openIM发送或者接收到url消息时会首先调用
getCustomUrlView(Fragment, YWMessage, String, YWConversation),
若getCustomUrlView()返回null,才会回调调用该方法获取商品详情,若getCustomUrlView()返回非null的view对象,则直接用此view展示url消息,不再回调该方法。因此,如果希望该方法被调用,
请确保getCustomUrlView(Fragment, YWMessage, String, YWConversation)返回null。 |
int |
getRecordResId(YWConversation conversation)
NOT FOR OPENIM
|
java.util.List<ReplyBarItem> |
getReplybarItems(Fragment pointcut,
YWConversation ywConversation)
Deprecated.
|
java.lang.String |
getSystemMessageContent(Fragment fragment,
YWConversation conversation,
java.lang.String content)
自定义系统消息文案
|
java.lang.String |
getTipsForSendingMsgToBlackContact(Fragment fragment,
YWConversation conversation)
聊天窗口一些通用的文案定制
|
java.lang.String |
messageToSendWhenOpenChatting(Fragment fragment,
YWConversation conversation)
当打开聊天窗口时,自动发送该字符串给对方
|
java.util.List<YWMessage> |
messageToSendWhenOpenChatting(Fragment fragment,
YWConversation conversation,
boolean isConversationFirstCreated,
long lastSendMessageTimeStamp) |
boolean |
needHideHead(int viewType)
是否需要隐藏头像
|
boolean |
needHideName(int viewType)
是否需要隐藏显示名
|
boolean |
onActivityResult(int requestCode,
int resultCode,
Intent data,
java.util.List<YWMessage> messageList)
如果开发者选择自己实现拍照或者选择照片的流程,则可以在该方法中实现照片(图片)的发送操作
|
void |
onCustomMessageClick(Fragment fragment,
YWMessage message)
Deprecated.
该方法已废弃,后续请使用
onMessageClick(Fragment, YWMessage) |
void |
onCustomMessageLongClick(Fragment fragment,
YWMessage message)
Deprecated.
|
boolean |
onFastReplyClick(Fragment pointcut,
YWConversation ywConversation)
NOT FOR OPENIM
|
void |
onGeoMessageClick(Fragment fragment,
YWMessage message)
Deprecated.
|
void |
onGeoMessageLongClick(Fragment fragment,
YWMessage message)
Deprecated.
|
boolean |
onMessageClick(Fragment fragment,
YWMessage message)
定制点击消息事件, 每一条消息的点击事件都会回调该方法,开发者根据消息类型,对不同类型的消息设置不同的点击事件
|
boolean |
onMessageLongClick(Fragment fragment,
YWMessage message)
定制长按消息事件,每一条消息的长按事件都会回调该方法,开发者根据消息类型,对不同类型的消息设置不同的长按事件
|
boolean |
onNumberClick(Activity activity,
java.lang.String clickString,
View widget)
消息内容中数字串点击事件自定义,如果开发者自定义请返回true
|
boolean |
onRecordItemClick(Fragment pointcut,
YWConversation ywConversation)
NOT FOR OPENIM
|
void |
onReplyBarItemClick(Fragment pointcut,
ReplyBarItem item,
YWConversation ywConversation)
Deprecated.
|
boolean |
onUrlClick(Fragment fragment,
YWMessage message,
java.lang.String url,
YWConversation ywConversation)
单聊ui界面,点击url的事件拦截 返回true;表示自定义处理,返回false,由默认处理
|
boolean |
showDefaultBarItems(YWConversation conversation)
是否显示默认的Item,照片,相册
|
boolean |
useInCallMode(Fragment fragment,
YWMessage message)
播放语音消息时是否使用听筒模式,默认使用扬声器模式播放语音消息
|
YWMessage |
ywMessageToSendWhenOpenChatting(Fragment fragment,
YWConversation conversation)
当打开聊天窗口时,自动发送该消息给对方
|
YWMessage |
ywMessageToSendWhenOpenChatting(Fragment fragment,
YWConversation conversation,
boolean isConversationFirstCreated)
当打开聊天窗口时,自动发送该消息给对方
|
public boolean useInCallMode(Fragment fragment,
YWMessage message)
fragment - 聊天窗口fragmentmessage - 语音消public java.util.List<ReplyBarItem> getCustomReplyBarItemList(Fragment pointcut,
YWConversation ywConversation,
java.util.List<ReplyBarItem> replyBarItemList)
pointcut - 聊天窗口fragmentywConversation - 当前聊天窗口对应的会话public java.util.List<ReplyBarItem> getReplybarItems(Fragment pointcut,
YWConversation ywConversation)
getCustomReplyBarItemList(Fragment, com.alibaba.mobileim.conversation.YWConversation, java.util.List<ReplyBarItem>)pointcut - 聊天窗口fragmentywConversation - 当前聊天窗口对应的会话public void onReplyBarItemClick(Fragment pointcut,
ReplyBarItem item,
YWConversation ywConversation)
getCustomReplyBarItemList(Fragment, com.alibaba.mobileim.conversation.YWConversation, java.util.List<ReplyBarItem>)pointcut - 聊天窗口fragitem - 用户自定义itemywConversation - 当前聊天窗口对应的会话public boolean onMessageClick(Fragment fragment,
YWMessage message)
fragment - 聊天窗口fragment对象message - 被点击的消息public boolean onMessageLongClick(Fragment fragment,
YWMessage message)
fragment - 聊天窗口fragment对象message - 被点击的消息public boolean enableDoubleClickEnlargeMessageText(Fragment fragment)
public GoodsInfo getGoodsInfoFromUrl(Fragment fragment,
YWMessage message,
java.lang.String url,
YWConversation ywConversation)
getCustomUrlView(Fragment, YWMessage, String, YWConversation),
若getCustomUrlView()返回null,才会回调调用该方法获取商品详情,若getCustomUrlView()返回非null的view对象,则直接用此view展示url消息,不再回调该方法。因此,如果希望该方法被调用,
请确保getCustomUrlView(Fragment, YWMessage, String, YWConversation)返回null。fragment - 可以通过 fragment.getActivity拿到Contextmessage - url所属的messageurl - urlywConversation - message所属的conversionpublic View getCustomUrlView(Fragment fragment,
YWMessage message,
java.lang.String url,
YWConversation ywConversation)
fragment - 可以通过 fragment.getActivity拿到Contextmessage - url所属的messageurl - urlywConversation - message所属的conversionpublic boolean onUrlClick(Fragment fragment,
YWMessage message,
java.lang.String url,
YWConversation ywConversation)
fragment - 可以通过 fragment.getActivity拿到Contextmessage - 点击的url所属的messageurl - 点击的urlywConversation - 当前消息所在会话public java.lang.String messageToSendWhenOpenChatting(Fragment fragment,
YWConversation conversation)
public YWMessage ywMessageToSendWhenOpenChatting(Fragment fragment, YWConversation conversation)
public java.lang.String getTipsForSendingMsgToBlackContact(Fragment fragment,
YWConversation conversation)
fragment - 聊天窗口fragmentconversation - 当前聊天窗口对应的会话public java.lang.String getCustomTimeString(Fragment fragment,
YWConversation conversation,
java.lang.String time)
fragment - 聊天窗口fragmentconversation - 当前聊天窗口对应的会话time - 默认时间文案public java.lang.String getSystemMessageContent(Fragment fragment,
YWConversation conversation,
java.lang.String content)
fragment - 聊天窗口fragmentconversation - 当前聊天窗口对应的会话content - 默认系统消息文案public int getCustomViewTypeCount()
public int getCustomViewType(YWMessage message)
message - 需要自定义显示的消息public boolean needHideHead(int viewType)
viewType - 自定义view类型public boolean needHideName(int viewType)
viewType - 自定义view类型public View getCustomView(Fragment fragment,
YWMessage message,
View convertView,
int viewType,
YWContactHeadLoadHelper headLoadHelper)
fragment - 聊天窗口fragmentmessage - 当前需要自定义view的消息convertView - 自定义viewviewType - 自定义view类型headLoadHelper - 头像加载管理器,用户可以调用该对象的方法加载头像public ReplyBarItem getCustomPhotoReplyBarItem()
getCustomReplyBarItemList(Fragment, com.alibaba.mobileim.conversation.YWConversation, java.util.List<ReplyBarItem>)public ReplyBarItem getCustomAlbumReplyBarItem()
getCustomReplyBarItemList(Fragment, com.alibaba.mobileim.conversation.YWConversation, java.util.List<ReplyBarItem>)public View getCustomGeoMessageView(Fragment fragment,
YWMessage message)
getCustomViewTypeCount(), getCustomViewType(YWMessage),
needHideHead(int),getCustomGeoMessageView(Fragment, YWMessage)message - 地理位置消息public View getCustomMessageView(Fragment fragment,
YWMessage message)
getCustomViewTypeCount(), getCustomViewType(YWMessage),
needHideHead(int),getCustomGeoMessageView(Fragment, YWMessage)fragment - message - public View getCustomMessageViewWithoutHead(Fragment fragment,
YWMessage message,
YWConversation conversation)
getCustomViewTypeCount(), getCustomViewType(YWMessage),
needHideHead(int),getCustomGeoMessageView(Fragment, YWMessage)fragment - message - conversation - public YWMessage ywMessageToSendWhenOpenChatting(Fragment fragment, YWConversation conversation, boolean isConversationFirstCreated)
fragment - 聊天窗口fragmentconversation - 当前聊天窗口对应的会话isConversationFirstCreated - 该会话是否是首次创建public java.util.List<YWMessage> messageToSendWhenOpenChatting(Fragment fragment, YWConversation conversation, boolean isConversationFirstCreated, long lastSendMessageTimeStamp)
public void onCustomMessageClick(Fragment fragment,
YWMessage message)
onMessageClick(Fragment, YWMessage)fragment - message - public void onCustomMessageLongClick(Fragment fragment,
YWMessage message)
onMessageLongClick(Fragment, YWMessage)public void onGeoMessageClick(Fragment fragment,
YWMessage message)
onMessageClick(Fragment, YWMessage)public void onGeoMessageLongClick(Fragment fragment,
YWMessage message)
onMessageLongClick(Fragment, YWMessage)message - public int getFastReplyResId(YWConversation conversation)
conversation - public boolean onFastReplyClick(Fragment pointcut,
YWConversation ywConversation)
pointcut - ywConversation - public int getRecordResId(YWConversation conversation)
conversation - public boolean onRecordItemClick(Fragment pointcut,
YWConversation ywConversation)
pointcut - ywConversation - public boolean onNumberClick(Activity activity,
java.lang.String clickString,
View widget)
activity - clickString - 被点击的数字stringpublic boolean showDefaultBarItems(YWConversation conversation)
conversation - public boolean onActivityResult(int requestCode,
int resultCode,
Intent data,
java.util.List<YWMessage> messageList)
requestCode - resultCode - data - messageList - 开发者构造图片消息并赋值给message参数,sdk会把该消息发送出去