If you are using the default interface from TapTalk.io UI implementation type, you can choose to enable or disable the available chat features that we provided by using the TapUI class.
Show / Hide Action Bar
By default, TapTalk activities will follow your project's app theme to show/hide action bar in activities, but you can show or hide action bar in TapTalk activities using the following methods:
importio.taptalk.TapTalk.Manager.TapUI;...// Show/hide action bar for all TapTalk activitiesTapUI.getInstance().setAllTapTalkActivityActionBarEnabled(ENABLED);// Show/hide action bar for TapTalk chat activityTapUI.getInstance().setTapTalkChatActivityActionBarEnabled(ENABLED);
import io.taptalk.TapTalk.Manager.TapUI...// Show/hide action bar for all TapTalk activitiesTapUI.getInstance().setAllTapTalkActivityActionBarEnabled(ENABLED)// Show/hide action bar for TapTalk chat activityTapUI.getInstance().setTapTalkChatActivityActionBarEnabled(ENABLED)
Note:
• Calling setAllTapTalkActivityActionBarEnabled will enable/disable action bar in all TapTalk activities.
• Calling setTapTalkChatActivityActionBarEnabled will only enable/disable action bar in TapTalk default chat room (TapUIChatActivity).
• Setting setAllTapTalkActivityActionBarEnabled to true and setTapTalkChatActivityActionBarEnabled to false will disable action bar in TapTalk default chat room, but enable it in other TapTalk activities, and vice versa.
Enable / Disable Message Read Status
You can choose to enable or disable read status of messages in room list and chat room. When disabled, read messages will show as delivered instead. Read status is enabled by default.
Enable / Disable Add Contact Feature
You can also choose to enable or disable the user from adding another user as TapTalk contact.
Note: Disabling add contact feature will also hide the following:
• Add to Contacts button in chat room
• Add to Contacts button in user profile
• New Contact button in start new chat page
• Scan QR Code button in start new chat page
Customize Room List Features
The following features in TapTalk default room list can be customized:
• Close Room List Button
• Search Chat
• My Account
• Start New Chat
Customize Chat Room Features
The following features in TapTalk default chat room can be customized:
• User / Group Profile Button
• Add to Contacts
• Mention Username
• Send Voice Note
• Link Preview in Message Bubble
Customize Chat Room Attachments
You can choose to enable or disable message attachments in chat room as follows:
• Documents
• Camera
• Gallery
• Location (requires Google Places API Key)
Note: Location attachment will be disabled by default when Google Places API Key is not set from TapTalk class.
Customize Chat Bubble Long Press Action
You can choose to enable or disable long press action menus in chat room as follows:
• Reply Message
• Forward Message
• Edit Message
• Delete Message
• Delete Others' Message by Admin
• Message Info
• Save Media to Gallery
• Open Link
• Compose Email
• Dial Number
• Send SMS
• View Profile
• Send Message
• Report Message (disabled by default)
Customize Start New Chat Features
If setNewChatButtonInRoomListVisible is enabled (default), you can also customize the availability of its contents:
• Add New Contact (add contact by search)
• Scan QR Code (add contact by scanning QR code)
• Create new group
Customize My Account Page
You can choose to show or hide the logout and delete account button in TapTalk My Account page.
Delete account button is hidden and does nothing if pressed by default, its action needs to be handled manually using TapUIMyAccountListener.
Customize User Profile Page
You can choose to show or hide the add to contacts & report/block button in TapTalk Chat Profile page.
The report button is hidden by default, and the report button in group profile currently does nothing by default when pressed, its action needs to be handled manually using TapUIChatProfileListener.
Customize Star Message Menu
To enable or disable star message menu in chat room and chat profile page, you may call setStarMessageMenuEnabled() method from TapUI class. This feature is enabled by default.
Customize Room List Item Swipe Menu
User is able to swipe an item in the room list page to quickly complete some actions. To enable/disable this feature, you may call the following methods below.
Customize Saved Messages Feature
To enable or disable Saved Messages feature, call the setSavedMessagesMenuEnabled() from TapUI. This feature is enabled by default. Disabling this feature when the user has previously used it will not remove the user's existing messages that has been sent to the Saved Messages chat room.
Customize Pin Message Menu
To enable or disable pin message menu in chat room, you may call setPinMessageMenuEnabled() method from TapUI class. This feature is enabled by default.
Enable / Disable In-App Browser
To choose whether to open message urls with in-app browser or the device's browser app, you may call setOpenLinkWithExternalBrowserEnabled() method from TapUI class. TapTalk.io's in-app browser will be used by default.
import io.taptalk.TapTalk.Manager.TapUI;
...
// Enable/disable mark as read swipe menu action
TapUI.getInstance().setMarkAsReadRoomListSwipeMenuEnabled(ENABLED);
// Enable/disable mark as unread swipe menu action
TapUI.getInstance().setMarkAsUnreadRoomListSwipeMenuEnabled(ENABLED);
// Enable/disable pin and unpin swipe menu action
TapUI.getInstance().setPinRoomListSwipeMenuEnabled(ENABLED);
// Enable/disable mute and unmute swipe menu action
TapUI.getInstance().setMuteRoomListSwipeMenuEnabled(ENABLED);
// Enable/disable delete chat swipe menu action
TapUI.getInstance().setDeleteRoomListSwipeMenuEnabled(ENABLED);
import io.taptalk.TapTalk.Manager.TapUI
...
// Enable/disable mark as read swipe menu action
TapUI.getInstance().setMarkAsReadRoomListSwipeMenuEnabled(ENABLED)
// Enable/disable mark as unread swipe menu action
TapUI.getInstance().setMarkAsUnreadRoomListSwipeMenuEnabled(ENABLED)
// Enable/disable pin and unpin swipe menu action
TapUI.getInstance().setPinRoomListSwipeMenuEnabled(ENABLED)
// Enable/disable mute and unmute swipe menu action
TapUI.getInstance().setMuteRoomListSwipeMenuEnabled(ENABLED)
// Enable/disable delete chat swipe menu action
TapUI.getInstance().setDeleteRoomListSwipeMenuEnabled(ENABLED)