Room List - TapCore
If you are using core implementation type, the application's chat room list can be managed with the TapCoreRoomListManager class using the following methods:
TapTalk Room List Method
Description
Call this method to fetch the latest room list data from the server and update to the local cache
Call this method to retrieve list of room data obtained from the local cache
Call this method to fetch new/updated messages that have not yet been received by the device
Call this method to search room lists from the device's local storage with a keyword
Add the chat room ID to the marked as unread chat room list
Remove chat room ID from the marked as unread chat room list
Retrieve the list of chat room IDs that has been marked as unread
Mute selected chat rooms until a specified time
Retrieve the list of muted chat room IDs and their respective mute expiry time
Add or remove the chat room ID to pinned chat room list
Retrieve list of pinned chat room IDs from the server
Get Updated Room List
Call this method to retrieve the latest room list data from the server and update to the local cache.
import io.taptalk.TapTalk.Manager.TapCoreRoomListManager;
import io.taptalk.TapTalk.Listener.TapCoreGetRoomListListener;
import io.taptalk.TapTalk.Model.TAPRoomListModel;
...
TapCoreRoomListManager.getInstance().getUpdatedRoomList(new TapCoreGetRoomListListener() {
@Override
public void onSuccess(List<TAPRoomListModel> roomLists) {
// Returns latest updated room lists
}
@Override
public void onError(String errorCode, String errorMessage) {
}
});import io.taptalk.TapTalk.Manager.TapCoreRoomListManager
import io.taptalk.TapTalk.Listener.TapCoreGetRoomListListener
import io.taptalk.TapTalk.Model.TAPRoomListModel
...
TapCoreRoomListManager.getInstance().getUpdatedRoomList(object : TapCoreGetRoomListListener() {
override fun onSuccess(roomLists: List<TAPRoomListModel>?) {
// Returns latest updated room lists
}
override fun onError(errorCode: String?, errorMessage: String?) {
}
})Get Room List From Cache
Call this method to retrieve list of room data obtained from the local cache.
Fetch New Message
Call this method to fetch new/updated messages that have not yet been received by the device. Can be used to retrieve pending messages when the device goes back online after an offline state.
Search Local Room List
Call this method to search room lists from the device's local storage with a keyword. Provided keyword will be used to filter room name in the search result.
Mark Chat Room as Unread
Call this method to add the selected chat room ID to the marked as unread chat room list.
Remove Unread Mark from Chat Room
Call this method to remove the selected chat room ID from the marked as unread chat room list.
Get Marked as Unread Chat Room List
Call this method to retrieve the list of chat room IDs that has been marked as unread.
Mute/Unmute Chat Room
Call these methods to mute the selected chat rooms until a specified time. Active user will not receive notifications from muted chat rooms.
To return chat rooms to its normal state and continue retrieving notifications, use unmuteChatRoom() method.
Get Muted Chat Rooms
Retrieve the list of muted chat room IDs and their respective mute expiry time.
Pin/Unpin Chat Room
You may call pinChatRoom() to add or remove the chat room ID to pinned chat room list. Chat rooms pinned by the user are generally shown on top of the chat room list. You can later retrieve the list of pinned chat room IDs with getPinnedChatRoomIDs().
Use unpinChatRoom() to remove existing pinned chat room ID from the pinned chat room list.
Get Pinned Chat Rooms
You can retrieve the list of the active user's pinned chat room IDs from the server with getPinnedChatRoomIDs().
Last updated
Was this helpful?