Get Started

Before you get started: Make sure you have created a channel in OneTalk dashboard and obtain the APP_KEY_SECRET.

Configure and Initialize TapTalk.io Omnichannel Android SDK

Step 1: Install TapTalk.io SDK

To start, open your Android project and add the following repositories to your top-level build.gradle file.

build.gradle (project)
allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
        maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
    }
}

Then add the following dependency to your app-level build.gradle:

build.gradle (:app)
dependencies {
    implementation 'com.github.taptalk-io:taptalk.io-omnichannel-android:2.4.2'
}

Note: In the app build.gradle file, make sure that your project is using supported Java 8 language features under the android tag like below

build.gradle (:app)
android {
    
    ...

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

Step 2: Initialize TapTalkLive

In order to use TapTalkLive SDK, you must first initialize a TapTalkLive instance by passing the CONTEXT, APP_KEY_SECRET, CLIENT_APP_ICON, and CLIENT_APP_NAME assigned to your application to the init method as a parameter. Generally, initialization is implemented in the Application class in your project.

Application.java
import io.taptalk.taptalklive.TapTalkLive;
import io.taptalk.taptalklive.Listener.TapTalkLiveListener;

...

TapTalkLive.init(
    CONTEXT, 
    APP_KEY_SECRET, 
    CLIENT_APP_ICON, 
    CLIENT_APP_NAME,
    new TapTalkLiveListener() {
        @Override
        public void onInitializationCompleted() {
            // Handle initialization success here
        }
        
        @Override
        public void onInitializationFailed(TTLErrorModel error) {
            // Handle initialization failure here
        }
    }
);

Step 3: Enable Chat Features

Please follow the steps in Enable Chat Features page to enable TapTalk.io's chat features, such as contact sync and sending media, document, and location messages.

Open TapTalk Omnichannel View

To open TapTalkLive's view UI for your application, you can use the openTapTalkLiveView method from the TapTalkLive class. This will open a homepage activity containing a list of available channels, the user's latest case, and QnA path.

YourActivity.java
TapTalkLive.openTapTalkLiveView(YourActivity.this);

Last updated

Was this helpful?