public class YWIMKit
extends YWUIAPI
| Modifier | Constructor and Description |
|---|---|
protected |
YWIMKit(String userId,
String appKey) |
| Modifier and Type | Method and Description |
|---|---|
void |
dismissCustomPopupWindow()
隐藏标题栏下方自定义PopupWindow
|
android.content.Intent |
getAtMsgListActivityIntent(android.content.Context contextForIntent,
YWConversation conversation) |
IYWCacheService |
getCacheService() |
android.content.Intent |
getChattingActivityIntent(EServiceContact setting)
获取打开默认聊天页面的intent, 获取到该intent后,可以根据自身产品需要增加对应的flag等。然后调用
Activity.startActivity(Intent) |
android.content.Intent |
getChattingActivityIntent(String targetUserId,
String targetAppKey)
获取打开默认聊天页面的intent, 获取到该intent后,可以根据自身产品需要增加对应的flag等。然后调用
Activity.startActivity(Intent) |
Fragment |
getChattingFragment(EServiceContact setting)
获取打开默认群聊页面的fragment
|
Fragment |
getChattingFragment(String targetId)
Deprecated.
该方法已废弃,后续请使用
getChattingFragment(String, String) |
Fragment |
getChattingFragment(String targetId,
String targetAppKey)
获取默认聊天页面的fragment
|
Class<? extends Fragment> |
getChattingFragmentClass() |
IYWContactService |
getContactService()
获取联系人管理器
|
ContactsFragment |
getContactsFragment()
获取联系人页面的fragment
|
Class<? extends Fragment> |
getContactsFragmentClass() |
android.content.Intent |
getConversationActivityIntent()
获取打开最近联系人列表页面的intent,获取到该intent后,可以根据自身产品需要增加对应的flag等。然后调用
Activity.startActivity(Intent) |
Fragment |
getConversationFragment() |
Class<? extends Fragment> |
getConversationFragmentClass() |
IYWConversationService |
getConversationService()
获取会话管理器
|
YWIMCore |
getIMCore()
获取YWIMCore实例
|
List<String> |
getLoginAccountList()
NOT FOR OPENIM,该方法不对ISV开放,请开发者忽略该方法
获取已登录的账号列表
|
IYWLoginService |
getLoginService()
获取登录管理器
|
android.content.Intent |
getP2PCustomChatActivityIntent(String shortUserId,
String appKey) |
android.content.Intent |
getTribeChattingActivityIntent(long tribeId)
获取打开默认群聊页面的intent, 获取到该intent后,可以根据自身产品需要增加对应的flag等。然后调用
Activity.startActivity(Intent) |
Fragment |
getTribeChattingFragment(long tribeId)
获取打开默认群聊页面的fragment
|
android.content.Intent |
getTribeCustomChatActivityIntent(long tribeId) |
IYWTribeService |
getTribeService()
获取群管理器
|
void |
hideCustomView()
隐藏聊天窗口标题栏下方的自定义view
|
void |
setCustomChatActivityListener(IYWCustomChatActivityListener listener) |
void |
setShortcutBadger(int badgeCount)
修改应用的桌面快捷方式的角标值
|
void |
showCustomPopupWindow(android.view.View popupWindowContentView)
显示标题栏下方自定义PopupWindow
|
void |
showCustomView(android.view.View view)
自定义聊天窗口标题栏下方自定义view,例如群聊窗口顶部的群消息屏蔽提示view
|
public IYWLoginService getLoginService()
public IYWTribeService getTribeService()
public IYWConversationService getConversationService()
public IYWContactService getContactService()
public YWIMCore getIMCore()
public void showCustomView(android.view.View view)
view - 自定义view,返回null则不显示自定义viewpublic void hideCustomView()
public void showCustomPopupWindow(android.view.View popupWindowContentView)
popupWindowContentView - 重要:必须以该形式初始化view---[inflate(R.layout.**, new RelativeLayout(context),false)
以让inflater知道父布局的类型,否则布局**中的高度和宽度无效,均变为wrap_contentpublic void dismissCustomPopupWindow()
public android.content.Intent getChattingActivityIntent(String targetUserId, String targetAppKey)
Activity.startActivity(Intent)targetUserId - 聊天对象idtargetAppKey - 聊天对象所属应用分配的appkeypublic android.content.Intent getTribeChattingActivityIntent(long tribeId)
Activity.startActivity(Intent)tribeId - 群idpublic android.content.Intent getChattingActivityIntent(EServiceContact setting)
Activity.startActivity(Intent)setting - 客服对象public Fragment getChattingFragment(String targetId, String targetAppKey)
targetId - 聊天对象idtargetAppKey - 聊天对象appKeypublic Fragment getTribeChattingFragment(long tribeId)
tribeId - 群idpublic Fragment getChattingFragment(EServiceContact setting)
setting - 客服对象public Fragment getChattingFragment(String targetId)
getChattingFragment(String, String)targetId - 聊天对象idpublic Class<? extends Fragment> getChattingFragmentClass()
public android.content.Intent getConversationActivityIntent()
Activity.startActivity(Intent)public Fragment getConversationFragment()
public Class<? extends Fragment> getConversationFragmentClass()
public ContactsFragment getContactsFragment()
public Class<? extends Fragment> getContactsFragmentClass()
public List<String> getLoginAccountList()
public void setShortcutBadger(int badgeCount)
badgeCount - 0表示清除,小于0不处理public IYWCacheService getCacheService()
public android.content.Intent getAtMsgListActivityIntent(android.content.Context contextForIntent,
YWConversation conversation)
public void setCustomChatActivityListener(IYWCustomChatActivityListener listener)
public android.content.Intent getP2PCustomChatActivityIntent(String shortUserId, String appKey)
public android.content.Intent getTribeCustomChatActivityIntent(long tribeId)