Supported Android versions

The Smartlook SDK is fully supported on Android Lollipop (API 21).

You can install Smartlook on Android Jelly Bean (API 18), however, you will not be able to record user sessions.

Installing the Smartlook SDK

To begin recording user sessions on your mobile apps, install the SDK.

  1. Implement the Smartlook analytics library in the Gradle file of your module:
implementation 'com.smartlook.android:smartlook-analytics:<<current-android-2-0-sdk-version>>'

πŸ“˜

AndroidX vs. Support libraries

The Smartlook SDK version <<current-android-2-0-sdk-version>> uses the AndroidX library. If you want to include the Support library, declare the following:

implementation 'com.smartlook.android:smartlook-analytics:<<current-android-2-0-sdk-version>>-support'
  1. Declare the repository in the project-level Gradle settings file:
dependencyResolutionManagement {
  repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
      maven {
        url "https://sdk.smartlook.com/android/release"
      }
   }
}

πŸ“˜

Gradle 6.8+

For older versions of Gradle, you need to declare the Smartlook Maven repository in the project-level Gradle file:

allprojects {
  repositories {
    maven {
      url "https://sdk.smartlook.com/android/release"
    }
  }
}
  1. Enter your unique projectKey and the start() call for Smartlook to record user sessions. If you do not know your project key, you can find it in the mobile project settings on the Smartlook Dashboard

To start recording when the user opens the app, use the Application class and onCreate():

class MyCustomApplication : Application() {
  override fun onCreate() {
    super.onCreate()
        
    val smartlook = Smartlook.instance  
    smartlook.preferences.projectKey = "YOUR PROJECT KEY"
    smartlook.start()
  }
}
public class MyCustomApplication extends Application {
  @Override
  public void onCreate() {
    super.onCreate();
      
    Smartlook smartlook = Smartlook.getInstance();
    smartlook.getPreferences().setProjectKey("YOUR PROJECT KEY");
    smartlook.start();
  }
}

Smartlook now records all user sessions on your app. All new user sessions will appear in the Smartlook player.

🚧

Mobile wifi connection

The Smartlook SDK uploads user sessions only when connected to wifi. You can enable mobile uploading in the project settings on the dashboard. You can read more on the recording process in When recordings appear in the dashboard.

SDK update & migrations

The Migration guide describes the migration from version 1.x.x to version 2.x.x.