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
  • Get TapTalk Implementation Type
  • Update Application Badge Count
  • Remote Configs
  • Core Configs
  • Project Configs
  • Custom Configs
  • Refresh Remote Configs
  • Enable / Disable Auto Contact Sync
  • Get Auto Contact Sync Status
  • Get Current Activity / Fragment in TapUI
  • Set Image Compression Quality
  • Smart Local Cache Management
  • Encrypted Chat

Was this helpful?

  1. PowerTalk Chat SDK Documentation
  2. PowerTalk Android

General

PreviousPush NotificationNextUser

Last updated 28 days ago

Was this helpful?

Get TapTalk Implementation Type

You can check the TapTalk.io implementation type used in your application by calling getTapTalkImplementationType().

import io.taptalk.TapTalk.Helper.TapTalk;
import io.taptalk.TapTalk.Helper.TapTalk.TapTalkImplementationType;

...

TapTalkImplementationType implementationType = TapTalk.getTapTalkImplementationType();
import io.taptalk.TapTalk.Helper.TapTalk
import io.taptalk.TapTalk.Helper.TapTalk.TapTalkImplementationType

...

var implementationType = TapTalk.getTapTalkImplementationType()

IMPLEMENTATION_TYPE

TapTalk implementation consists of 3 types which are:

  • TapTalkImplementationTypeUI: used for implementation with only TapUI

  • TapTalkImplementationTypeCore: used for implementation with only TapCore

  • TapTalkImplementationTypeCombine: used for implementation with both of TapCore and TapUI combined

Update Application Badge Count

Calling updateApplicationBadgeCount() will refresh the number of unread messages in the application and trigger the callback onTapTalkUnreadChatRoomBadgeCountUpdated() present in .

import io.taptalk.TapTalk.Helper.TapTalk;

...

TapTalk.updateApplicationBadgeCount();
import io.taptalk.TapTalk.Helper.TapTalk

...

TapTalk.updateApplicationBadgeCount()

Remote Configs

A TapTalk.io project owns a remote configuration, which consists of 3 configuration types: Core Configs, Project Configs, and Custom Configs. A configuration value can be obtained with the respective configuration type's getter method, and will return a Map object. To get a specific value, call the get() method from the returned Map with the respective key. The value obtained will always be in a String format and should be converted each according to their uses. Each configuration type will be explained below.

Core Configs

Config Key

Value

chatMediaMaxFileSize

Number of maximum allowed chat media file size in bytes

roomPhotoMaxFileSize

Number of maximum allowed group chat room profile picture file size in bytes

userPhotoMaxFileSize

Number of maximum allowed user profile picture file size in bytes

groupMaxParticipants

Number of maximum allowed participants in a group chat room

channelMaxParticipants

Number of maximum allowed participants in a channel

Below is an example to get the value of chatMediaMaxFileSize:

import io.taptalk.TapTalk.Helper.TapTalk;

...

Map<String, String> coreConfigs = TapTalk.getCoreConfigs();
String maxFileSizeString = coreConfigs.get("chatMediaMaxFileSize");
long maxFileSizeValue = Long.valueOf(maxFileSize);
import io.taptalk.TapTalk.Helper.TapTalk

...

val coreConfigs = TapTalk.getCoreConfigs()
val maxFileSizeString = coreConfigs["chatMediaMaxFileSize"]
val maxFileSizeValue = maxFileSize?.toLong()

Project Configs

Config Key

Value

usernameIgnoreCase

"0" if username in the project is case sensitive "1" if username in the project is case insensitive

An example to obtain usernameIgnoreCase value:

import io.taptalk.TapTalk.Helper.TapTalk;

...

Map<String, String> projectConfigs = TapTalk.getProjectConfigs(); 
String usernameIgnoreCase = projectConfigs.get("usernameIgnoreCase");
boolean isUsernameIgnoreCase;
if (usernameIgnoreCase.equals("0")) {
    isUsernameIgnoreCase = false;
}
else if (usernameIgnoreCase.equals("1")) {
    isUsernameIgnoreCase = true;
}
import io.taptalk.TapTalk.Helper.TapTalk

...

val projectConfigs = TapTalk.getProjectConfigs()
val usernameIgnoreCase = projectConfigs["usernameIgnoreCase"]
val isUsernameIgnoreCase: Boolean
if (usernameIgnoreCase == "0") {
    isUsernameIgnoreCase = false
}
else if (usernameIgnoreCase == "1") {
    isUsernameIgnoreCase = true
}

Custom Configs

Custom config values are specified by the user, and can be customized through the TapTalk.io Dashboard. To get the project's custom configs, call the getCustomConfigs() method.JavaKotlin

import io.taptalk.TapTalk.Helper.TapTalk;

...

Map<String, String> customConfigs = TapTalk.getCustomConfigs();
import io.taptalk.TapTalk.Helper.TapTalk

...

val customConfigs = TapTalk.getCustomConfigs()

Refresh Remote Configs

To refresh remote configs with the latest updated values, call the refreshRemoteConfigs() method in TapTalk.io class.

import io.taptalk.TapTalk.Helper.TapTalk;
import io.taptalk.TapTalk.Listener.TapCommonListener;

...

TapTalk.refreshRemoteConfigs(new TapCommonListener() {
    @Override
    public void onSuccess(String successMessage) {
        // Updated configs successfully
    }

    @Override
    public void onError(String errorCode, String errorMessage) {
        
    }
});
import io.taptalk.TapTalk.Helper.TapTalk
import io.taptalk.TapTalk.Listener.TapCommonListener

...

TapTalk.refreshRemoteConfigs(object : TapCommonListener() {
    override fun onSuccess(successMessage: String?) {
        // Updated configs successfully
    }

    override fun onError(errorCode: String?, errorMessage: String?) {

    }
})

Enable / Disable Auto Contact Sync

If you are using UI implementation method in your application, TapTalk.io provides a feature to automatically sync your user's phone contacts with their TapTalk.io contacts. You can choose to enable or disable auto contact sync by calling these methods. If auto contact sync is enabled, TapTalk.io will automatically sync your user's phone contacts and add them to TapTalk.io contacts if their phone number is registered to TapTalk.io when the application is opened. Please note that the default value is enabled.JavaKotlin

import io.taptalk.TapTalk.Helper.TapTalk;

...

@Override
public void onCreate() {
    ...
    
    // Call this method to enable or disable auto contact sync
    // The default value is set to enabled if you do not set this method
    TapTalk.setAutoContactSyncEnabled(IS_ENABLED);
}
import io.taptalk.TapTalk.Helper.TapTalk

...

override fun onCreate(savedInstanceState: Bundle?) {
    ...
    
    // Call this method to enable or disable auto contact sync
    // The default value is set to enabled if you do not set this method
    TapTalk.setAutoContactSyncEnabled(IS_ENABLED)
}

Parameters IS_ENABLED: (boolean) set to true to enable auto contact sync

Get Auto Contact Sync Status

Use this method to obtain auto contact sync status. This method will return true if auto contact sync is enabled.

import io.taptalk.TapTalk.Helper.TapTalk;

...

boolean isAutoContactSyncEnabled = TapTalk.isAutoContactSyncEnabled();
import io.taptalk.TapTalk.Helper.TapTalk

...

val isAutoContactSyncEnabled = TapTalk.isAutoContactSyncEnabled()

Get Current Activity / Fragment in TapUI

You can obtain the currently showing room list fragment, chat activity, or any TapTalk activity from TapUI using the following methods:

import io.taptalk.TapTalk.Manager.TapUI;
import io.taptalk.TapTalk.View.Fragment.TapUIRoomListFragment;
import io.taptalk.TapTalk.View.Activity.TapUIChatActivity;

...

// Obtain TapUIRoomListFragment
TapUIRoomListFragment currentTapTalkRoomListFragment = TapUI.getInstance().getCurrentTapTalkRoomListFragment();

// Obtain currently showing TapUIChatActivity
TapUIChatActivity currentTapTalkChatActivity = TapUI.getInstance().getCurrentTapTalkChatActivity();

// Obtain any AppCompatActivity in the foreground
AppCompatActivity currentForegroundTapTalkActivity = TapUI.getInstance().getCurrentForegroundTapTalkActivity();
import io.taptalk.TapTalk.Manager.TapUI
import io.taptalk.TapTalk.View.Fragment.TapUIRoomListFragment
import io.taptalk.TapTalk.View.Activity.TapUIChatActivity

...

// Obtain TapUIRoomListFragment
val currentTapTalkRoomListFragment = TapUI.getInstance().getCurrentTapTalkRoomListFragment()

// Obtain currently showing TapUIChatActivity
val currentTapTalkChatActivity = TapUI.getInstance().getCurrentTapTalkChatActivity()

// Obtain any AppCompatActivity in the foreground
val currentForegroundTapTalkActivity = TapUI.getInstance().getCurrentForegroundTapTalkActivity()

Note: the methods above may return null if the selected activity or fragment is not found.

Set Image Compression Quality

You can customize the compression quality of images used for upload and download. The range of the compression quality is set between 10 and 100. The higher the quality, the better the images will look, but they will also take more storage space as their size increases.

import io.taptalk.TapTalk.Helper.TapTalk;

...

TapTalk.setImageCompressionQuality(IMAGE_COMPRESSION_QUALITY);
import io.taptalk.TapTalk.Helper.TapTalk

...

TapTalk.setImageCompressionQuality(IMAGE_COMPRESSION_QUALITY)

Parameters IMAGE_COMPRESSION_QUALITY: (int) image compression quality between 10 to 100

Smart Local Cache Management

In order to optimize storage usage and performance, TapTalk.io cleans any local data of messages that are older than 1 month. This cleanup runs on a scheduled interval. Deleted messages can later be retrieved from the server when required.

Encrypted Chat

TapTalk.io SDK encrypts all message contents before sending them to the server to protect any sensitive content contained in the messages. All messages received and stored in the server will stay encrypted. Messages will be decrypted once fetched in end user's local device in order to show their contents. TapTalk.io uses AES Crypt combined with secure local password to encrypt and decrypt message contents.

TapListener