Skip to main content

Android SDK Installation

Install the Told SDK in your Android application to display in-app surveys.

The Installation page in your dashboard

After creating an Android source, Told brings you to its Installation page (sidebar Settings → Installation). This page is a guided wizard that walks you through the four steps required to set up the SDK.

You can come back to it at any time from the source sidebar.

1. Add application ID

This step asks you to register the application ID (package name) of your Android app. Enter it in the textbox and click Add (Ajouter).

Once added, the field is replaced by a small table showing the registered application ID, its OS, its status (To be validated) and a link to the documentation.

Each source supports a single application ID at a time.

2. Add Told to dependencies

Add the Told dependency to your app/build.gradle file:

dependencies {
implementation("club.told:told-android-sdk:1.0.3")
}

Click Copy code to copy the line directly from the dashboard.

3. Add permissions

Told requires the following permissions in your AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

4. Initialize the SDK

The dashboard provides a Kotlin snippet to initialize the SDK in a class extending Application. The recommended pattern is to use a singleton so the SDK is initialized only once for the whole app. The snippet already contains your Source ID — just paste it as-is.

import android.app.Application
import com.told.sdk.ToldSDK

class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
ToldSDK.init(
applicationContext = applicationContext,
sourceId = "YOUR_SOURCE_ID"
)
}
}

Don't forget to register your Application class in the AndroidManifest.xml:

<application android:name=".MyApplication" ...>
...
</application>

Prerequisites

  • A source created for your Android app
  • Android project with Kotlin

Installation methods

The dashboard wizard installs Told via Gradle. Alternative installation methods are documented separately:

Verify installation

After building and running your app, you can verify the SDK is loaded by calling the debug function:

Told.debugWidget()

This logs diagnostic information to Logcat.