@Override public boolean onMenuItemSelected(int featureId, MenuItem item) { int menuId = item.getItemId(); if (menuId == R.id.people) { Utils.goActivity(this, ConversationDetailActivity.class); } return super.onMenuItemSelected(featureId, item); }
public static void chatByUserId(final Activity from, String userId) { final ProgressDialog dialog = Utils.showSpinnerDialog(from); ChatManager.getInstance() .fetchConversationWithUserId( userId, new AVIMConversationCreatedCallback() { @Override public void done(AVIMConversation conversation, AVException e) { dialog.dismiss(); if (Utils.filterException(e)) { chatByConversation(from, conversation); } } }); }