Get Started

Quick Start

MeetTalk Android SDK provides all of the features available in the PowerTalk SDK, with the addition of voice and video call feature. This page presents a brief overview of the SDK’s structure and abilities, then lets you go through the preliminary steps of implementing the SDK in your own app.

Configure and Initialize TapTalk.io Android SDK

The first step to configure MeetTalk SDK will be the same as configuring PowerTalk SDK, if you have completed this step, you can skip to Step 2.

Step 1: Create a new application from your dashboard

1. Login to TapTalk.io Dashboard, then choose Development -> Apps
2. Click New App Button, input App Name and choose Platform, and then click Create New App Button.
3. A pop-up dialog will be shown with provided App Key ID & App Key Secret
Note: Please remember to save your App Key ID & your App Key Secret because it will only be shown once and will be used in TapTalk.io initialization

Step 2: Install MeetTalk SDK

To start, open your Android project and add the following repositories to your top-level build.gradle file.Project build.gradle
Java
Project build.gradle
1
allprojects {
2
repositories {
3
...
4
maven { url "https://jitpack.io" }
5
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
6
maven { url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases" }
7
}
8
}
Copied!
Please also note that the minimum SDK version to install MeetTalk SDK is 23.
Then add the following dependency to your app-level build.gradle:
Java
app module build.gradle
1
android {
2
...
3
defaultConfig {
4
...
5
minSdkVersion 23
6
}
7
}
8
9
dependencies {
10
implementation 'com.github.taptalk-io:meettalk-android:0.1.6'
11
}
Copied!
Note: In the app build.gradle file, make sure that your project is using supported Java 8 language features like below
Java
app module build.gradle
1
compileOptions {
2
sourceCompatibility JavaVersion.VERSION_1_8
3
targetCompatibility JavaVersion.VERSION_1_8
4
}
Copied!

Step 3: Initialize MeetTalk in your Application class.

In order to use MeetTalk, you must first initialize an instance by passing the APP_ID, APP_SECRET, APP_ICON, APP_BASE_URL, and IMPLEMENTATION_TYPE assigned to your application to the init method as a parameter. Generally, initialization is implemented in the Application class in your project.
Note: To get BASE_URL you can follow our documentation on how to get Base URL on TapTalk.io
Java
Kotlin
1
MeetTalk.init(
2
CONTEXT,
3
APP_KEY_ID,
4
APP_KEY_SECRET,
5
APP_ICON,
6
APP_NAME,
7
APP_BASE_URL,
8
IMPLEMENTATION_TYPE,
9
meetTalkListener);
Copied!
1
MeetTalk.init(
2
CONTEXT,
3
APP_KEY_ID,
4
APP_KEY_SECRET,
5
APP_ICON,
6
APP_NAME,
7
APP_BASE_URL,
8
IMPLEMENTATION_TYPE,
9
meetTalkListener)
Copied!
Parameters CONTEXT: (Context) application context APP_KEY_ID: (String) application key ID APP_KEY_SECRET: (String) application key Secret APP_ICON: (int) drawable resource ID APP_NAME: (String) your application name APP_BASE_URL: (String) base API URL IMPLEMENTATION_TYPE: (enum) found in TapTalkImplentationType, more detailed information below meetTalkListener: (MeetTalkListener) an interface to detect PowerTalk and MeetTalk Android SDK's delegates and callbacks
IMPLEMENTATION_TYPE TapTalkImplementationType 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
Note: MeetTalk.init() will also initialize a TapTalk instance, so if you are already initializing TapTalk instance with TapTalk.init(), replace the initialization with only MeetTalk.init().

Step 4: Authenticate to TapTalk.io

In order to use the abilities of the Android SDK in your client app, a TapTalk instance must be initiated in each client app through user authentication with TapTalk.io server. An authenticated user account allows the instance to communicate and interact with the server. To authenticate your user with the server, follow the instructions in Authentication page.

Setup FileProvider in your application

To enable file transfer through chat messages, you need to define FileProvider in your application's AndroidManifest.xml file, under the <application> tag.
AndroidManifest.xml
1
<application
2
android:name=".YourApplication"
3
...>
4
5
<provider
6
android:name="android.support.v4.content.FileProvider"
7
android:authorities="${applicationId}.fileprovider"
8
android:exported="false"
9
android:grantUriPermissions="true">
10
<meta-data
11
android:name="android.support.FILE_PROVIDER_PATHS"
12
android:resource="@xml/file_paths" />
13
</provider>
14
15
</application>
Copied!

Initialize Google Places API Key (Optional)

To enable location search result preview while sending location message, a Google Places API Key is required. To obtain the API key for your application, you can check the documentation provided by Google. To initialize, insert your obtained key using the initializeGooglePlacesApiKey() method.
Java
Kotlin
1
TapTalk.initializeGooglePlacesApiKey(GOOGLE_PLACES_API_KEY);
Copied!
1
TapTalk.initializeGooglePlacesApiKey(GOOGLE_PLACES_API_KEY)
Copied!
Your key also needs to be defined in your application's AndroidManifest.xml file, under the <application> tag.
AndroidManifest.xml
1
<application
2
android:name=".YourApplication"
3
...>
4
5
<meta-data
6
android:name="com.google.android.geo.API_KEY"
7
android:value="GOOGLE_PLACES_API_KEY" />
8
9
</application>
Copied!
Parameters GOOGLE_PLACES_API_KEY: (String) Google Places API Key

Request Enable Phone Account to User

In order for the user's device to receive incoming call from another device, the active user is required to enable the installed app in the device's Phone Account Settings. MeetTalk provides a method which will show a confirmation dialog to the user, when the user confirms, it will open the device's Phone Account Settings page to request the user to enable the app to receive calls.
Java
Kotlin
1
MeetTalk.checkAndRequestEnablePhoneAccountSettings(ACTIVITY);
Copied!
1
MeetTalk.checkAndRequestEnablePhoneAccountSettings(ACTIVITY)
Copied!
Parameters ACTIVITY: (Activity) The app's current foreground activity to show the confirmation dialog

Initiate New Call

Initiating a call in MeetTalk requires data from TAPRoomModel. which will then be used to construct a conference data for the call. To initiate a call, use the initiateNewConferenceCall method from MeetTalk class.
You may also customize the outgoing call using the provided parameters.
Java
Kotlin
1
// Initiate a voice call (participants will enter call with video muted)
2
MeetTalk.initiateNewConferenceCall(ACTIVITY, ROOM);
3
4
// Initiate a call with custom audio/video state
5
MeetTalk.initiateNewConferenceCall(ACTIVITY, ROOM, START_WITH_AUDIO_MUTED, START_WITH_VIDEO_MUTED);
6
7
// Initiate a call with custom audio/video state and recipient display name
8
MeetTalk.initiateNewConferenceCall(ACTIVITY, ROOM, START_WITH_AUDIO_MUTED, START_WITH_VIDEO_MUTED, RECIPIENT_DISPLAY_NAME);
Copied!
1
// Initiate a voice call (participants will enter call with video muted)
2
MeetTalk.initiateNewConferenceCall(ACTIVITY, ROOM)
3
4
// Initiate a call with custom audio/video state
5
MeetTalk.initiateNewConferenceCall(ACTIVITY, ROOM, START_WITH_AUDIO_MUTED, START_WITH_VIDEO_MUTED)
6
7
// Initiate a call with custom audio/video state and recipient display name
8
MeetTalk.initiateNewConferenceCall(ACTIVITY, ROOM, START_WITH_AUDIO_MUTED, START_WITH_VIDEO_MUTED, RECIPIENT_DISPLAY_NAME)
Copied!
Parameters ACTIVITY: (Activity) The app's current foreground activity, which will be used to launch the call screen ROOM: (TAPRoomModel) the chat room where the call will be initiated START_WITH_AUDIO_MUTED: (boolean) initial state of the participants' microphone START_WITH_VIDEO_MUTED: (boolean) initial state of the participants' front camera RECIPIENT_DISPLAY_NAME: (String) custom display name/nickname for the recipient that will be displayed during the call
When this method is called in personal chat room, the active user will start and enter the call, and send a notification to the recipient, which will then receive an incoming call. The recipient will join the voice call once the incoming call is answered.
Participants will still be able to mute/unmute their microphone/camera during the call regardless of the START_WITH_AUDIO_MUTED and START_WITH_VIDEO_MUTED parameter.
Note: Initiating a call is currently only available in personal chat rooms.