Skip to main content
This guide walks you through adding the Kount Android SDK to your Android application.

Prerequisites

Before you begin, make sure you have:
  • Android Studio installed
  • A Kount merchant ID (contact Kount if you don’t have one)
  • Minimum Android SDK 26 (Oreo) configured in your project

Add JitPack Repository

The Kount Android SDK is distributed via JitPack. Add the JitPack repository to your project-level build.gradle file:
buildscript {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

Add Dependencies

Add the Kount SDK and required dependencies to your app-level build.gradle file:
dependencies {
    // Kount Data Collector SDK
    implementation 'com.kount:datacollector:5.0.0'
    
    // Required: Instant Apps library (even if not building an Instant App)
    implementation 'com.google.android.instantapps:instantapps:1.1.0'
    
    // Required: Networking
    implementation 'com.android.volley:volley:1.2.1'
    
    // Required: JSON parsing
    implementation 'com.google.code.gson:gson:2.8.6'
    
    // Recommended: Kotlin support
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
}
The current version is 5.0.0. Check the changelog for the most recent release notes.

Configure Minimum SDK Version

Ensure your app’s minimum SDK version meets the requirements in your build.gradle:
android {
    compileSdkVersion 34
    
    defaultConfig {
        applicationId "com.example.myapp"
        minSdkVersion 26  // Android 8.0 Oreo minimum
        targetSdkVersion 34
    }
    
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
    }
}

Instant App Support

The Instant Apps library must be included at compile time, even if you’re not building an Instant App:
implementation 'com.google.android.instantapps:instantapps:1.1.0'
Due to Android restrictions on Instant Apps, data collection may be degraded compared to full Android applications. However, the library must still be included for the SDK to function properly.

Add Permissions

Add the following permissions to your AndroidManifest.xml:
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.myapp">

    <!-- Required for network communication -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    
    <!-- Optional: For location-based data collection -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

    <application
        ...
    </application>
</manifest>
Location permissions are optional but recommended for more accurate fraud detection. You must request these permissions at runtime on Android 6.0 (API 23) and higher.

Sync Project

After making these changes:
  1. Click Sync Now in the Android Studio banner, or
  2. Select File > Sync Project with Gradle Files
Once the sync completes successfully, you’re ready to initialize the SDK.

Verify Installation

To verify the SDK is properly installed, add this import to any Kotlin or Java file:
import com.kount.api.KountSDK
If the import resolves without errors, the installation was successful.

Next Steps

Quick Start Guide

Learn how to initialize the SDK and start collecting device data

Build docs developers (and LLMs) love