Splunk MINT SDK for Android (Legacy)

Splunk MINT SDK for Android Developer Guide

Splunk MINT is no longer available for purchase as of January 29, 2021. Customers who have already been paying to ingest and process MINT data in Splunk Enterprise will continue to receive support until December 31, 2021, which is End of Life for all MINT products: App, Web Service (Management Console), SDK and Add-On.

Requirements and installation for Android


Add the following values to your AndroidManifest.xml file:

  • android:minSdkVersion="15"
  • android:targetSdkVersion="22" or later

For more information, see the <uses-sdk> page on the Android Developers website.


The following downloads are available for the Splunk MINT SDK for Android.

Use of the Splunk MINT SDK is subject to the Splunk MINT Terms of Service. You are responsible for complying with privacy laws applicable to your collection of data per the Splunk MINT Terms of Service, which may include notice and consent mechanisms. With version 5.2.2, Splunk MINT Android SDK automatically sends end-user data to Splunk when the end user's device connects to the internet. You can disable this behavior by calling disableAutoFlash before SDK initialization.

Install the SDK plugin using Maven

If you use Apache Maven (version 3.0.5 and later), install the SDK plugin as follows:

  1. Add the following dependency to your pom.xml file:
  2. <dependencies>
        <!-- other dependencies here -->
  3. Add the repository details to the pom.xml file:
  4. <repositories>
        <!-- other repositories here -->
            <id>Splunk MINT repo</id>
            <name>The Splunk MINT Repository</name>
            <url>file://<!-- path to the repository -->/mint-plugin-repo-5.2.5</url>

Use the Gradle plugin for Android

You can use the Gradle plugin for Android to integrate with the Splunk MINT SDK.


To use the Gradle plugin for Android:

  1. Download the MINT plugin repository (mint-android-repo-5.2.5.zip), which contains a Maven repository structure, and unzip it into your mobile app project at the app level. We recommend that you do not place the repository in the /libs folder.
  2. Update your your Gradle build file as described below. The build.gradle file is located in the root folder of your project.
  3. Compile and build your project.

For more information about Gradle, see the Gradle Plugin User Guide on the Android Tools Project Site.

Use the Android SDK without MINT instrumentation

To use the Gradle plugin without MINT instrumentation, add the following MINT dependencies to your app's build.gradle file.

repositories {
    maven {
        url uri('mint-plugin-repo-5.2.5')

dependencies {
    compile 'com.splunk:mint-android-sdk:5.2.5'

Use the Android SDK with MINT instrumentation

The Gradle plugin for Splunk MINT supports instrumentation for network calls.

The following types of MINT instrumentation are available:

  • Instrumentation for HttpURLConnection and HttpsURLConnection intercepts HTTP and HTTPS connections.
  • Instrumentation for OkHttp intercepts calls to the OkHttp client.
All types collect the following fields in network events: 
  • signature: The signature of the intercepted network API method (for example, int HttpUrlConnection.getResponseCode()).
  • hashcode: The hashcode of the HTTP connection object, allowing you to differentiate between multiple connections to the same address.
  • threadID: The thread ID.
  • httpMethod: The HTTP method (GET, PUT, POST, or NA).

Add the MINT dependencies to your app's build.gradle file as described below. When you compile and build your project, verify that the MINT transformation task is running.

build.gradle file

apply plugin: 'com.android.application'
apply plugin: 'com.splunk.mint.gradle.android.plugin'

android {
    defaultConfig {
        // Use this option when your app targets a version of the Android SDK that is less than 21:
        multiDexEnabled = true  
buildscript {
    repositories {
        maven {
            url uri('mint-plugin-repo-5.2.5')
        // Will need to add jcenter repo OR mavenCentral
    dependencies {
        classpath 'com.splunk:mint-gradle-android-plugin:5.2.5'

repositories {
    maven {
        url uri('mint-plugin-repo-5.2.5')

Last modified on 28 January, 2019
MINT Documentation   Add Splunk MINT to your Android project

This documentation applies to the following versions of Splunk MINT SDK for Android (Legacy): 5.2.x

Was this topic useful?

You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters