This guide will help you install and set up the Linkrunner SDK in your native Android application.

Requirements

  • Android 5.0 (API level 21) or higher
  • Android Studio Flamingo (2022.2.1) or newer
  • Gradle 8.0+

Installation

Gradle (build.gradle)

Add the Linkrunner SDK to your app’s build.gradle file:

dependencies {
    implementation 'com.linkrunner:sdk:1.1.2'
}

Make sure you have the Maven Central repository in your project’s settings.gradle file:

dependencyResolutionManagement {
    repositories {
        google()
        mavenCentral()
    }
}

Required Permissions

Add the following permissions to your AndroidManifest.xml file:

<!-- Required for the SDK to make network requests -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Note: The AD_ID permission (<uses-permission android:name="com.google.android.gms.permission.AD_ID" />) is already included in the SDK and is required for collecting device identifiers (GAID).

Importing in Kotlin/Java

After installation, you can import the SDK in your Kotlin or Java files:

// Kotlin
import com.linkrunner.sdk.LinkRunner
// Java
import com.linkrunner.sdk.LinkRunner;