本文整理汇总了Java中com.hyphenate.easeui.EaseConstant.CHATTYPE_CHATROOM属性的典型用法代码示例。如果您正苦于以下问题:Java EaseConstant.CHATTYPE_CHATROOM属性的具体用法?Java EaseConstant.CHATTYPE_CHATROOM怎么用?Java EaseConstant.CHATTYPE_CHATROOM使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.hyphenate.easeui.EaseConstant
的用法示例。
在下文中一共展示了EaseConstant.CHATTYPE_CHATROOM属性的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onDestroy
@Override
public void onDestroy() {
super.onDestroy();
if (groupListener != null) {
EMClient.getInstance().groupManager().removeGroupChangeListener(groupListener);
}
if (chatRoomListener != null) {
EMClient.getInstance().chatroomManager().removeChatRoomListener(chatRoomListener);
}
if(chatType == EaseConstant.CHATTYPE_CHATROOM){
EMClient.getInstance().chatroomManager().leaveChatRoom(toChatUsername);
}
}
示例2: sendMessage
protected void sendMessage(EMMessage message){
if (message == null) {
return;
}
if(chatFragmentHelper != null){
//set extension
chatFragmentHelper.onSetMessageAttributes(message);
}
if (chatType == EaseConstant.CHATTYPE_GROUP){
message.setChatType(ChatType.GroupChat);
}else if(chatType == EaseConstant.CHATTYPE_CHATROOM){
message.setChatType(ChatType.ChatRoom);
}
//send message
EMClient.getInstance().chatManager().sendMessage(message);
//refresh ui
if(isMessageListInited) {
messageList.refreshSelectLast();
}
}
示例3: toGroupDetails
/**
* open group detail
*
*/
protected void toGroupDetails() {
if (chatType == EaseConstant.CHATTYPE_GROUP) {
EMGroup group = EMClient.getInstance().groupManager().getGroup(toChatUsername);
if (group == null) {
Toast.makeText(getActivity(), R.string.gorup_not_found, Toast.LENGTH_SHORT).show();
return;
}
if(chatFragmentHelper != null){
chatFragmentHelper.onEnterToChatDetails();
}
}else if(chatType == EaseConstant.CHATTYPE_CHATROOM){
if(chatFragmentHelper != null){
chatFragmentHelper.onEnterToChatDetails();
}
}
}
示例4: onDestroy
@Override
public void onDestroy() {
super.onDestroy();
if (groupListener != null) {
EMClient.getInstance().groupManager().removeGroupChangeListener(groupListener);
}
if(chatType == EaseConstant.CHATTYPE_CHATROOM){
EMClient.getInstance().chatroomManager().leaveChatRoom(toChatUsername);
}
if(chatRoomChangeListener != null){
EMClient.getInstance().chatroomManager().removeChatRoomChangeListener(chatRoomChangeListener);
}
}
示例5: sendMessage
protected void sendMessage(EMMessage message){
if(chatFragmentListener != null){
//设置扩展属性
chatFragmentListener.onSetMessageAttributes(message);
}
// 如果是群聊,设置chattype,默认是单聊
if (chatType == EaseConstant.CHATTYPE_GROUP){
message.setChatType(ChatType.GroupChat);
}else if(chatType == EaseConstant.CHATTYPE_CHATROOM){
message.setChatType(ChatType.ChatRoom);
}
//发送消息
EMClient.getInstance().chatManager().sendMessage(message);
//刷新ui
if(isMessageListInited) {
messageList.refreshSelectLast();
}
}
示例6: toGroupDetails
/**
* 点击进入群组详情
*
*/
protected void toGroupDetails() {
if (chatType == EaseConstant.CHATTYPE_GROUP) {
EMGroup group = EMClient.getInstance().groupManager().getGroup(toChatUsername);
if (group == null) {
Toast.makeText(getActivity(), R.string.gorup_not_found, 0).show();
return;
}
if(chatFragmentListener != null){
chatFragmentListener.onEnterToChatDetails();
}
}else if(chatType == EaseConstant.CHATTYPE_CHATROOM){
if(chatFragmentListener != null){
chatFragmentListener.onEnterToChatDetails();
}
}
}
示例7: onDestroy
@Override
public void onDestroy() {
super.onDestroy();
if (groupListener != null) {
EMClient.getInstance().groupManager().removeGroupChangeListener(groupListener);
}
if(chatType == EaseConstant.CHATTYPE_CHATROOM){
EMClient.getInstance().chatroomManager().leaveChatRoom(toChatUsername);
}
if(chatRoomChangeListener != null){
EMClient.getInstance().chatroomManager().removeChatRoomListener(chatRoomChangeListener);
}
}
示例8: toGroupDetails
/**
* open group detail
*
*/
protected void toGroupDetails() {
if (chatType == EaseConstant.CHATTYPE_GROUP) {
EMGroup group = EMClient.getInstance().groupManager().getGroup(toChatUsername);
if (group == null) {
Toast.makeText(getActivity(), R.string.gorup_not_found, 0).show();
return;
}
if(chatFragmentHelper != null){
chatFragmentHelper.onEnterToChatDetails();
}
}else if(chatType == EaseConstant.CHATTYPE_CHATROOM){
if(chatFragmentHelper != null){
chatFragmentHelper.onEnterToChatDetails();
}
}
}
示例9: onBackPressed
public void onBackPressed() {
if (inputMenu.onBackPressed()) {
getActivity().finish();
if(chatType == EaseConstant.CHATTYPE_GROUP){
EaseAtMessageHelper.get().removeAtMeGroup(toChatUsername);
EaseAtMessageHelper.get().cleanToAtUserList();
}
if (chatType == EaseConstant.CHATTYPE_CHATROOM) {
EMClient.getInstance().chatroomManager().leaveChatRoom(toChatUsername);
}
}
}
示例10: onDestroy
@Override
public void onDestroy() {
super.onDestroy();
if (groupListener != null) {
EMClient.getInstance().groupManager().removeGroupChangeListener(groupListener);
}
if(chatType == EaseConstant.CHATTYPE_CHATROOM){
EMClient.getInstance().chatroomManager().leaveChatRoom(toChatUsername);
}
if(chatRoomChangeListener != null){
EMClient.getInstance().chatroomManager().removeChatRoomChangeListener(chatRoomChangeListener);
}
}
示例11: onBackPressed
public void onBackPressed() {
if (inputMenu.onBackPressed()) {
getActivity().finish();
if (chatType == EaseConstant.CHATTYPE_CHATROOM) {
EMClient.getInstance().chatroomManager().leaveChatRoom(toChatUsername);
}
}
}