---
updatedAt: 2026-08-11T11:11:57.000Z
---

# Integrate the Connect SDK into a native Android app (View-based)

The Connect SDK captures visitors' interactions with mobile applications. You can integrate the library into your native Android app built with the View system and track the findings in the Acoustic Connect interface.

**Languages**: Kotlin and Java

**Availability**: Pro, Premium, and Ultimate

**Scope**: This guide covers integrating the Connect SDK for development and testing. For production configuration, see [Prepare the Connect library for production use on Android devices](https://developer.goacoustic.com/acoustic-connect/docs/prepare-the-connect-library-for-production-use-on-android-devices).

# Requirements

* **Acoustic Connect subscription**. You must register your app in Connect and get credentials for it (app key and collector URL). For instructions, see [Connect mobile apps](https://connect.goacoustic.com/hc/en-us/articles/50316996762387-Connect-mobile-apps) in the user guide.
* **Development environment**. Android Studio.
* **Mobile app compatibility**. Android 8.0 (API level 26) to Android 16 (API level 36)

# Known issues

* **Dialogs and bottom sheets are not captured in session replay.** `AlertDialog` and `BottomSheetDialogFragment` are not supported — their layout, interactions, and gestures are not logged. Standard Activity and Fragment screens are not affected.
* **Text change events are not supported.** Input is captured when a field loses focus, not as the user types. The final value entered is recorded, but character-by-character editing and correction behavior are not.
* **User interactions on screens that close programmatically are not captured.** When an Activity calls `finish()` to dismiss itself, any queued interaction events are lost before they can be flushed to the collector. Gestures and input from these screens are not transmitted.
* **Mixed View and Compose apps may not work correctly.** The SDK is tested and supported for apps that use the View system exclusively. Apps that mix the View system and Jetpack Compose may experience unpredictable behavior including missed captures, incorrect layout hierarchy, or gestures not logging correctly. For Compose apps, use the [Connect SDK for Jetpack Compose](https://developer.goacoustic.com/acoustic-connect/docs/integrate-connect-sdk-into-android-compose-app) instead.

# Prerequisites

Before you start the integration, make sure **AndroidManifest.xml** has the following permissions:

```xml XML
<!-- Required permissions -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

<!-- Recommended permissions: location -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
```

# Initial setup

Add the Connect SDK dependency to your project.

<Tabs>
  <Tab title="Gradle">
    1. In the app-level **build.gradle** file, update the `dependencies` block to include the Connect SDK.

    ```groovy Groovy
    dependencies {
        implementation "io.github.go-acoustic:connect:11.0.13"
    }
    ```

    2. Synchronize the project.

    3. Initialize the SDK in your `Application` subclass. Replace the placeholders with your Connect credentials.

    ```kotlin Kotlin
    class MyApplication : Application() {
        override fun onCreate() {
            super.onCreate()
            Connect.init(this)
            Connect.enable(
                appKey = "YOUR_APP_KEY",
                postMessageUrl = "YOUR_COLLECTOR_URL"
            )
        }
    }
    ```

    <Callout icon="📘" theme="info">
      ### Note

      This inline pattern gets you running quickly during integration. Before you ship, move your credentials out of your `Application` subclass and split them by build type — see [Move your Android integration to production](https://developer.goacoustic.com/acoustic-connect/docs/prepare-the-connect-library-for-production-use-on-android-devices).
    </Callout>

    4. Add the gesture hook to your base activity.

    ```kotlin Kotlin
    override fun dispatchTouchEvent(e: MotionEvent?): Boolean {
        Connect.dispatchTouchEvent(this, e)
        return super.dispatchTouchEvent(e)
    }
    ```

    5. Build and run your app to verify the integration.
  </Tab>

  <Tab title="Version catalog">
    1. In **gradle/libs.versions.toml**, add the Connect SDK version and library entry.

    ```toml TOML
    [versions]
    connect = "11.0.13"

    [libraries]
    connect = { module = "io.github.go-acoustic:connect", version.ref = "connect" }
    ```

    2. In the app-level **build.gradle.kts**, update the `dependencies` block.

    ```kotlin Kotlin
    dependencies {
        implementation(libs.connect)
    }
    ```

    3. Synchronize the project.

    4. Initialize the SDK in your `Application` subclass. Replace the placeholders with your Connect credentials.

    ```kotlin Kotlin
    class MyApplication : Application() {
        override fun onCreate() {
            super.onCreate()
            Connect.init(this)
            Connect.enable(
                appKey = "YOUR_APP_KEY",
                postMessageUrl = "YOUR_COLLECTOR_URL"
            )
        }
    }
    ```

    <Callout icon="📘" theme="info">
      ### Note

      This inline pattern gets you running quickly during integration. Before you ship, move your credentials out of your `Application` subclass and split them by build type — see [Move your Android integration to production](https://developer.goacoustic.com/acoustic-connect/docs/prepare-the-connect-library-for-production-use-on-android-devices).
    </Callout>

    5. Add the gesture hook to your base activity.

    ```kotlin Kotlin
    override fun dispatchTouchEvent(e: MotionEvent?): Boolean {
        Connect.dispatchTouchEvent(this, e)
        return super.dispatchTouchEvent(e)
    }
    ```

    6. Build and run your app to verify the integration.
  </Tab>
</Tabs>

# Verify the SDK is running

The Connect Android library ships with verbose logging enabled by default. Once you complete the integration steps above, run your app and open Logcat in Android Studio. Filter for the tags `Tealeaf` , `EOCore` and `Connect` to confirm the SDK is initializing, capturing screens, and posting to the collector.

Verbose logging is convenient during integration but should be disabled before you ship. For instructions, see [Prepare the Connect library for production use on Android devices](https://developer.goacoustic.com/acoustic-connect/docs/prepare-the-connect-library-for-production-use-on-android-devices).

# Next steps

* [Identify users at sign-in](https://developer.goacoustic.com/acoustic-connect/docs/identify-users-at-sign-in-android) — send a logged in signal after authentication so Connect can match the app visitor to a known contact.
* [Identify users at registration](https://developer.goacoustic.com/acoustic-connect/docs/identify-users-at-registration-android) — send an account registered signal after sign-up to create or match a contact from their first session.