Parameters
CONTEXT: (Context) your Application or Activity context
USER_ID: (String) Taptalk.io User ID of the recipient user
PREFILLED_TEXT: (String) if not empty, the active user's chat composer will be filled with this predefined message when the chat room is opened (existing draft will be replaced)
CUSTOM_QUOTE_TITLE: (String) title of custom quote data
CUSTOM_QUOTE_CONTENT: (String) content / subtitle of custom quote data
CUSTOM_QUOTE_IMAGE_URL: (String) image URL string of custom quote
USER_INFO: (HashMap<String , Object>) client-specified data or details of the custom quote
Open Chat Room with Client User ID
Opens a chat room using client user ID (XCUserID) of the recipient user. This method will directly open the chat room activity.
import io.taptalk.TapTalk.Manager.TapUI;
import io.taptalk.TapTalk.Listener.TapCommonListener;
...
TapUI.getInstance().openChatRoomWithXCUserID(
CONTEXT,
XC_USER_ID,
PREFFILED_TEXT,
CUSTOM_QUOTE_TITLE,
CUSTOM_QUOTE_CONTENT,
CUSTOM_QUOTE_IMAGE_URL,
USER_INFO,
new TapCommonListener() {
@Override
public void onSuccess(String successMessage) {
// Chat room opened successfully
}
@Override
public void onOpenRoomFailed(String errorMessage) {
}
}
);
Parameters
CONTEXT: (Context) your Application or Activity context
XC_USER_ID: (String) Client User ID of the recipient user
PREFILLED_TEXT: (String) if not empty, the active user's chat composer will be filled with this predefined message when the chat room is opened (existing draft will be replaced)
CUSTOM_QUOTE_TITLE: (String) title of custom quote data
CUSTOM_QUOTE_CONTENT: (String) content / subtitle of custom quote data
CUSTOM_QUOTE_IMAGE_URL: (String) image URL string of custom quote
USER_INFO: (HashMap<String , Object>) client-specified data or details of the custom quote
Open Room with Room Model
Opens a chat room using an available room model. This method will directly open the chat room activity.
Parameters
CONTEXT: (Context) your Application or Activity contextROOM: (TAPRoomModel) existing chat room data to open
The openChatRoomWithRoomModel() method with extra parameters below is used when you wish to set a predefined quote for the user in the opened chat room.
Parameters
CONTEXT: (Context) your Application or Activity context
ROOM: (TAPRoomModel) existing chat room data to open
PREFILLED_TEXT: (String) if not empty, the active user's chat composer will be filled with this predefined message when the chat room is opened (existing draft will be replaced)
CUSTOM_QUOTE_TITLE: (String) title of custom quote data
CUSTOM_QUOTE_CONTENT: (String) content / subtitle of custom quote data
CUSTOM_QUOTE_IMAGE_URL_STRING: (String) image URL string of custom quote
USER_INFO: (HashMap<String , Object>) client-specified data or details of the custom quote
Open Room with Room Model & Scroll to Selected Message
Opens a chat room using an available room model. This method will directly open the chat room and scroll the view to the selected message.
Parameters
CONTEXT: (Context) your Application or Activity context
ROOM: (TAPRoomModel) existing chat room data to open
SCROLL_TO_MESSAGE_WITH_LOCAL_ID: (String) scrolls the view to the message with the specified local ID when the chat room is opened
Open Saved Messages Chat Room
Opens of the active user's Saved Messages chat room. This method will directly open the chat room activity.