Room List - TapUI

If you are using UI implementation type, you can use the method below to open TapTalk.io's chat room list activity.

TapUI.getInstance().openRoomList(CONTEXT);

You may also open a specified chat room directly after the room list by passing a room model or room ID parameter. Passing roomID may require additional time to load chat room data after the room list page is opened.

// Opens room list, and then chat room with provided room model
TapUI.getInstance().openRoomList(CONTEXT, ROOM);

// Opens room list, then loads chat room data and opens it when successful
TapUI.getInstance().openRoomList(CONTEXT, ROOM_ID);

Parameters CONTEXT: (Context) your Application or Activity context ROOM: (TAPRoomModel) selected room model to be opened ROOM_ID: (String) ID of the selected room model

Another option to use the chat room list as a fragment is also available:

private TapUIMainRoomListFragment roomListFragment;

roomListFragment = TapUI.getInstance().getRoomListFragment();

getSupportFragmentManager()
                .beginTransaction()
                .show(roomListFragment)
                .commit();

Last updated