Build a sample Android Compose app to evaluate the Connect SDK

Before you start integrating the Connect library into your Jetpack Compose app, we recommend installing our sample app with the library.

If you have a Views-based app, see Build a sample Android Views app to evaluate the Connect SDK.

Requirements

  • Development environment. To build and run the sample app, you need a recent version of Android Studio with AGP 7.3 or higher. The minumum required Gradle version is 7.4.
  • Mobile app compatibility. You can run the sample app on simulators and real devices. Android 7.0 (API level 24) or later is required. We recommend Android 14 (API level 34).
  • Acoustic Connect. If you have an Ultimate license for Connect and want to check how session replay works, you'll need an access key. For instructions, see Get an application key for the Connect library.

Setup instructions

  1. Clone the sample app code from our GitHub repository.
git clone https://github.com/go-acoustic/SampleCode_Android_Sunflower_ComposeUI.git
  1. Open SampleCode_Android_Sunflower_ComposeUI-main/sunflower with Android Studio.
  2. Synchronize the project.
  3. (Connect Ultimate only) In SunflowerApp.kt, find ConnectWrapper and replace the default application key and endpoint URL with the credentials assigned to your Connect subscription. This is necessary to access session replay in Connect (see the exercise below).
Register Sample App
  1. Build and run the app in Android Studio.

Exercise (Connect Ultimate)

If you have an Ultimate license for Connect, you can check how user behavior data is captured.

  1. Click around in the sample app.
  2. In your Connect account, go to Optimise > Session search.
  3. Find the session and play it back.
Session search in Tealeaf

Notes:

  • If a user is inactive for 30 minutes, their session times out.
  • To learn more about the Sessions module, see Session replay in our marketing guide.