当前位置: 首页>>代码示例>>Java>>正文


Java EaseConstant.CHATTYPE_CHATROOM属性代码示例

本文整理汇总了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);
    }
}
 
开发者ID:turoDog,项目名称:KTalk,代码行数:16,代码来源:EaseChatFragment.java

示例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();
    }
}
 
开发者ID:turoDog,项目名称:KTalk,代码行数:20,代码来源:EaseChatFragment.java

示例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();
    	}
    }
}
 
开发者ID:turoDog,项目名称:KTalk,代码行数:20,代码来源:EaseChatFragment.java

示例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);
    }
    
}
 
开发者ID:Vicent9920,项目名称:FanChat,代码行数:17,代码来源:EaseChatFragment.java

示例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();
    }
}
 
开发者ID:Rabbit00,项目名称:MeifuGO,代码行数:18,代码来源:EaseChatFragment.java

示例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();
    	}
    }
}
 
开发者ID:Rabbit00,项目名称:MeifuGO,代码行数:20,代码来源:EaseChatFragment.java

示例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);
    }
    
}
 
开发者ID:HyphenateInc,项目名称:Hyphenate-EaseUI-Android,代码行数:16,代码来源:EaseChatFragment.java

示例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();
    	}
    }
}
 
开发者ID:HyphenateInc,项目名称:Hyphenate-EaseUI-Android,代码行数:20,代码来源:EaseChatFragment.java

示例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);
        }
    }
}
 
开发者ID:turoDog,项目名称:KTalk,代码行数:12,代码来源:EaseChatFragment.java

示例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);
    }
}
 
开发者ID:Rabbit00,项目名称:MeifuGO,代码行数:14,代码来源:EaseChatFragment.java

示例11: onBackPressed

public void onBackPressed() {
    if (inputMenu.onBackPressed()) {
        getActivity().finish();
        if (chatType == EaseConstant.CHATTYPE_CHATROOM) {
        	EMClient.getInstance().chatroomManager().leaveChatRoom(toChatUsername);
        }
    }
}
 
开发者ID:Rabbit00,项目名称:MeifuGO,代码行数:8,代码来源:EaseChatFragment.java


注:本文中的com.hyphenate.easeui.EaseConstant.CHATTYPE_CHATROOM属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。