TapTalk.io Documentation
  • Introduction
  • OneTalk Omnichannel Documentation
    • Getting Started with OneTalk
      • Team Members
      • Add Topic
      • Assign Agent to Topic
      • Paid Proactive Chat
    • Channel Integration
      • Telegram Integration
      • WhatsApp SME Integration
      • Instagram DM Integration
      • Facebook Messenger Integration
      • Live Chat Integration (iOS, Android, Web)
        • OneTalk Live Chat for Android
          • Get Started
          • Event Listener
          • Authentication
          • Case & Topic
          • Navigate Live Chat UI
          • Customize UI Appearance
        • OneTalk Live Chat for iOS
          • Get Started
          • Background Process in TapTalk.io Omnichannel iOS
          • Event Delegate
          • Authentication
          • Case & Topic
          • Navigate Live Chat UI
          • Customize UI Appearance
        • OneTalk Live Chat for Web
          • Get Started
          • Callback
          • Method
        • OneTalk Live Chat for React Native
          • Get Started - Android
          • Authentication - Android
          • Get Started - iOS
          • Authentication - iOS
        • OneTalk Live Chat for Flutter
          • Get Started - Android
          • Get Started - iOS
      • Google Business Messages Integration
      • Google Business Profile Integration
      • Tokopedia Integration
    • Integration API
      • Inbox API
      • User/Contact API
    • Live Chat Widget Callback Function
    • Social Channel Button
    • Custom Chatbot Integration
      • Get Started
      • Edit or Delete Chatbot
      • Development
    • QnA via API
    • Webhook
  • PowerTalk Chat SDK Documentation
    • Getting Started with PowerTalk
    • PowerTalk Android
      • Get Started
      • Enable Chat Features
      • Authentication
      • TapUI and TapCore
      • Background Process in TapTalk.io
      • Connection
      • Event Listener
      • Push Notification
      • General
      • User
      • Room List
        • Room List - TapUI
        • Room List - TapCore
      • Chat Room and Messages
        • Chat Room and Messages - TapUI
        • Chat Room and Messages - TapCore
      • Contact
      • Message Type
      • Customize UI Appearance
      • Customize Chat Features
      • Customize Chat Message Bubble
      • Customize Navigation Bar
      • Deep Linking
      • Error Codes
    • PowerTalk iOS
      • Get Started
      • TapUI and TapCore
      • Background Process in TapTalk.io
      • Implement Application Delegate
      • Authentication
      • Connection
      • Event Delegate
      • Push Notification
      • General
      • User
      • Room List
        • Room List - TapUI
        • Room List - TapCore
      • Chat Room and Messages
        • Chat Room and Messages - TapUI
        • Chat Room and Messages - TapCore
      • Contact
      • Message Type
      • Customize UI Appearance
      • Customize Chat Features
      • Customize Chat Message Bubble
      • Customize Navigation Bar
      • Deep Linking
      • Error Codes
    • PowerTalk React Native
      • Get Started - Android
      • Get Started - iOS
    • PowerTalk Flutter
      • Get Started - Android
      • Get Started - iOS
    • Javascript SDK
      • Get Started
      • Authentication
      • Connection
      • General
      • Event Listener
      • User
      • Room List
      • Chat Room
      • Messages
      • Contact
      • Message Type
    • Server API
      • Get Started
      • Base URL
      • Authentication
      • User
      • Contact
      • Message
      • Room
    • Webhook
      • Get Started
      • Webhook Payload
  • MeetTalk SDK Documentation
    • Getting Started with MeetTalk
    • MeetTalk Android
      • Get Started
      • Event Listener
    • MeetTalk iOS
      • Get Started
      • Implement Application Delegate
      • Event Delegate
  • SendTalk API Documentation
    • Introduction
    • Whatsapp Verification
Powered by GitBook
On this page
  • Open Chat Room With User Model
  • Open Chat Room with TapTalk.io User ID
  • Open Chat Room with Client User ID
  • Open Room with Room Model
  • Open Room with Room Model & Scroll to Selected Message
  • Open Saved Messages Chat Room

Was this helpful?

  1. PowerTalk Chat SDK Documentation
  2. PowerTalk Android
  3. Chat Room and Messages

Chat Room and Messages - TapUI

The following methods from the TapUI class can be used to open a chat room when UI implementation type is used.

TapTalk UI Chat Room Method

Description

Opens a chat room using the recipient user model. This method will directly open the chat room activity.

Opens a chat room using TapTalk.io user ID of the recipient user. This method will directly open the chat room activity.

Opens a chat room using client user ID of the recipient user. This method will directly open the chat room activity.

Opens a chat room using an available room model. This method will directly open the chat room activity.

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.

Opens of the active user's Saved Messages chat room. This method will directly open the chat room activity.

Open Chat Room With User Model

Opens a chat room using the recipient user model. This method will directly open the chat room activity.

import io.taptalk.TapTalk.Manager.TapUI;
import io.taptalk.TapTalk.Model.TAPUserModel;

...

TapUI.getInstance().openChatRoomWithOtherUser(CONTEXT, RECIPIENT_USER);
import io.taptalk.TapTalk.Manager.TapUI
import io.taptalk.TapTalk.Model.TAPUserModel

...

TapUI.getInstance().openChatRoomWithOtherUser(CONTEXT, RECIPIENT_USER)

Parameters CONTEXT: (Context) your Application or Activity context RECIPIENT_USER: (TAPUserModel) the recipient user to chat with

Open Chat Room with TapTalk.io User ID

Opens a chat room using client user ID 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().openChatRoomWithUserID(
    CONTEXT,
    USER_ID,
    PREFILLED_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 onError(String errorCode, String errorMessage) {
    
        }
    }
);
import io.taptalk.TapTalk.Manager.TapUI
import io.taptalk.TapTalk.Listener.TapCommonListener

...

TapUI.getInstance().openChatRoomWithUserID(
    CONTEXT,
    USER_ID,
    PREFILLED_TEXT,
    CUSTOM_QUOTE_TITLE,
    CUSTOM_QUOTE_CONTENT,
    CUSTOM_QUOTE_IMAGE_URL,
    USER_INFO,
    object : TapCommonListener() {
        override fun onSuccess(successMessage: String?) {
            // Chat room opened successfully
        }
    
        override fun onError(errorCode: String?, errorMessage: String?) {
    
        }
    }
)

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) {
    
        }
    }
);
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,
    object : TapCommonListener() {
        override fun onSuccess(successMessage: String?) {
            // Chat room opened successfully
        }
    
        fun onOpenRoomFailed(errorMessage: String) {
    
        }
    }
)

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.

import io.taptalk.TapTalk.Manager.TapUI;
import io.taptalk.TapTalk.Model.TAPRoomModel;

...

TapUI.getInstance().openChatRoomWithRoomModel(CONTEXT, ROOM);
import io.taptalk.TapTalk.Manager.TapUI
import io.taptalk.TapTalk.Model.TAPRoomModel

...

TapUI.getInstance().openChatRoomWithRoomModel(CONTEXT, ROOM)

Parameters CONTEXT: (Context) your Application or Activity context ROOM: (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.

import io.taptalk.TapTalk.Manager.TapUI;
import io.taptalk.TapTalk.Model.TAPRoomModel;

...

TapUI.getInstance().openChatRoomWithRoomModel(
    CONTEXT,
    ROOM,
    PREFILLED_TEXT,
    CUSTOM_QUOTE_TITLE,
    CUSTOM_QUOTE_CONTENT,
    CUSTOM_QUOTE_IMAGE_URL,
    USER_INFO
);
import io.taptalk.TapTalk.Manager.TapUI;
import io.taptalk.TapTalk.Model.TAPRoomModel;

...

TapUI.getInstance().openChatRoomWithRoomModel(
    CONTEXT,
    ROOM,
    PREFILLED_TEXT,
    CUSTOM_QUOTE_TITLE,
    CUSTOM_QUOTE_CONTENT,
    CUSTOM_QUOTE_IMAGE_URL,
    USER_INFO
)

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.

import io.taptalk.TapTalk.Manager.TapUI;
import io.taptalk.TapTalk.Model.TAPRoomModel;

...

TapUI.getInstance().openChatRoomWithRoomModel(
    CONTEXT,
    ROOM,
    SCROLL_TO_MESSAGE_WITH_LOCAL_ID
);
import io.taptalk.TapTalk.Manager.TapUI
import io.taptalk.TapTalk.Model.TAPRoomModel

...

TapUI.getInstance().openChatRoomWithRoomModel(
    CONTEXT,
    ROOM,
    SCROLL_TO_MESSAGE_WITH_LOCAL_ID
)

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.

import io.taptalk.TapTalk.Manager.TapUI;

...

TapUI.getInstance().openSavedMessagesChatRoom(CONTEXT);
import io.taptalk.TapTalk.Manager.TapUI

...

TapUI.getInstance().openSavedMessagesChatRoom(CONTEXT)

Parameters CONTEXT: (Context) your Application or Activity context

PreviousChat Room and MessagesNextChat Room and Messages - TapCore

Last updated 28 days ago

Was this helpful?

Open Chat Room With User Model
Open Chat Room with TapTalk.io User ID
Open Chat Room with Client User ID
Open Room with Room Model
Open Room with Room Model & Scroll to Selected Message
Open Saved Messages Chat Room