Documentation Index

Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt

Use this file to discover all available pages before exploring further.

Required Dependencies and Permissions

Prev Next

This guide helps you understand the requirements for SDK setup, native steps, required dependencies, and permissions.

Required for Setup

  • An Android device or emulator with a minimum API 24

  • A Google / Firebase Cloud Messaging Server Key and google-services.json imported into your app

  • Android Studio

Your project needs to support AndroidX libraries.

Insider One’s Mobile SDK targets 16 KB memory page size devices (required by Google Play as of November 1, 2025). Make sure every native dependency you ship is also 16 KB aligned.

Android Native Steps

You can configure Insider repositories in either the modern settings.gradle(.kts) location or the legacy project-level build.gradle.

1. Add the Insider Maven repository.

settings.gradle (Groovy DSL) in modern projects

Android Studio templates created with AGP 7.0+ centralize repositories in settings.gradle. Add the Insider and (optionally) Huawei repositories inside dependencyResolutionManagement.

pluginManagement {
     repositories {
         google()
         mavenCentral()
         gradlePluginPortal()
         maven { url "https://developer.huawei.com/repo/" } // optional, only for Huawei builds
     }
 }

 dependencyResolutionManagement {
     repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
     repositories {
         google()
         mavenCentral()
         maven {
             url "https://mobilesdk.useinsider.com/android"
             content { includeGroup("com.useinsider") }
         }
         maven { url "https://developer.huawei.com/repo/" } // optional, only for Huawei builds
     }
 }
pluginManagement {
     repositories {
         google()
         mavenCentral()
         gradlePluginPortal()
         maven("https://developer.huawei.com/repo/") // optional, only for Huawei builds
     }
 }

 dependencyResolutionManagement {
     repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
     repositories {
         google()
         mavenCentral()
         maven {
             url = uri("https://mobilesdk.useinsider.com/android")
             content { includeGroup("com.useinsider") }
         }
         maven("https://developer.huawei.com/repo/") // optional, only for Huawei builds
     }
 }

If you are not targeting Huawei devices, omit every line marked optional, only for Huawei builds.

2. Add google-services inside your project dependencies.
3. Add https://mobilesdk.useinsider.com/android inside of repositories for all projects.

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        mavenCentral()
        maven { url "https://developer.huawei.com/repo/"}
        maven {
url "https://mobilesdk.useinsider.com/android"
content {
                includeGroup("com.useinsider")
}
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:8.4.2'
        classpath 'com.google.gms:google-services:4.4.2'
        classpath 'com.huawei.agconnect:agcp:1.9.1.302'
// Note: Do not place your application dependencies here; they belong in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url "https://mobilesdk.useinsider.com/android" }
        maven { url "https://developer.huawei.com/repo/"}

    }
}

If you do not want to target Huawei devices, remove Huawei dependencies.

buildscript {
    repositories {        
        google()        
        jcenter()        
        maven { url "https://developer.huawei.com/repo/"}    
    }    
    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.0'        
        classpath 'com.google.gms:google-services:4.3.3'        
        classpath 'com.huawei.agconnect:agcp:1.2.1.301'    
    }
}
allprojects {
    repositories {        
        google()        
        jcenter()        
        maven {url "https://mobilesdk.useinsider.com/android"}        
        maven {url "https://developer.huawei.com/repo/"}    
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}

4. Declare the Insider partner name. Open your module-level build.gradle(.kts) and declare manifestPlaceholders inside android > defaultConfig with your Insider partner name.

Groovy DSL — build.gradle

android {
     // …
     defaultConfig {
         // DO NOT FORGET to change your_partner_name.
         // Use only lowercase. your_partner_name is provided by Insider.
         manifestPlaceholders = [partner: "your_partner_name"]
         // …
     }
     // …
 }

Kotlin DSL — build.gradle.kts

android {
     // …
     defaultConfig {
         // DO NOT FORGET to change your_partner_name.
         // Use only lowercase. your_partner_name is provided by Insider.
         manifestPlaceholders["partner"] = "your_partner_name"
         // …
     }
     // …
 }

5. Set the launch mode of your main activity. Add singleTask as launchMode on your main activity in AndroidManifest.xml:

<activity
     android:name=".MainActivity"
     android:launchMode="singleTask">
     <!-- … -->
 </activity>

<uses-permission android:name="android.permission.WAKE_LOCK"/> is optional.

Required Only For Hybrid SDKs

Required for hybrid SDKs (Cordova, React Native, Flutter). Optional for the native Android SDK. Add these only if you hit a NoClassDefFoundError or ClassNotFoundException after enabling code shrinking.

1. Remove android:allowBackup="false" from your AndroidManifest.xml file.  

2. If you are using proguard, add the following lines to your proguard-rules.pro file.

-keep class com.useinsider.insider.Insider { *; }

-keep interface com.useinsider.insider.InsiderCallback { *; }
-keep class com.useinsider.insider.InsiderUser { *; }
-keep interface com.useinsider.insider.InsiderIDListener { *; }
-keep interface com.useinsider.insider.InsiderUser$InsiderIDResult { *; }
-keep class com.useinsider.insider.InsiderProduct { *; }
-keep class com.useinsider.insider.InsiderEvent { *; }
-keep class com.useinsider.insider.InsiderCallbackType { *; }
-keep class com.useinsider.insider.InsiderGender { *; }
-keep class com.useinsider.insider.InsiderIdentifiers { *; }
-keep class com.useinsider.insider.CloseButtonPosition { *; }
-keep class com.useinsider.insider.AppCardsException { public *; }
-keep enum com.useinsider.insider.AppCardsException$AppCardsExceptionCode { public *; }
-keep interface com.useinsider.insider.AppCardsCampaignsCallback { public *; }
-keep interface com.useinsider.insider.AppCardsMarkAsReadCallback { public *; }
-keep interface com.useinsider.insider.AppCardsDeleteCallback { public *; }
-keep class com.useinsider.insider.InsiderAppCardCampaignsResponse { public *; }
-keep class com.useinsider.insider.InsiderAppCard { public *; }
-keep class com.useinsider.insider.InsiderAppCardImage { public *; }
-keep class com.useinsider.insider.InsiderAppCardContent { public *; }
-keep class com.useinsider.insider.InsiderAppCardButton { public *; }
-keep class com.useinsider.insider.InsiderAppCardAction { public *; }
-keep class com.useinsider.insider.InsiderAppCardAppReviewAction { public *; }
-keep class com.useinsider.insider.InsiderAppCardAppSettingsAction { public *; }
-keep class com.useinsider.insider.InsiderAppCardDeeplinkAction { public *; }
-keep class com.useinsider.insider.InsiderAppCards { public *; }

-keep interface com.useinsider.insider.RecommendationEngine$SmartRecommendation { *; }
-keep interface com.useinsider.insider.MessageCenterData { *; }
-keep class com.useinsider.insider.InsiderGeofence { *; }
-keep class com.useinsider.insider.HuaweiGeofence { *; }
-keep class com.useinsider.insider.ContentOptimizerDataType { *; }

Required Dependencies and Permissions

1. Open your module level build.gradle file.
2. Set the following required dependencies.

The Insider SDK ships in two flavors:

Artifax suffix

Use it when…

Huawei dependencies

com.useinsider:insider:<version>

The app is published to a store that delivers it to Huawei devices (AppGallery) and Google Play.

Required

com.useinsider:insider:<version>-nh

The app is published only to Google Play/non-Huawei stores.

Not needed. Do not add the com.huawei.hms:* artifacts.

The examples below show where to implement required dependencies. Please keep in mind that the versions for Insider SDK are an example in the line below as "com.useinsider:insider:16.0.3".
This is an older version, please check latest SDKs from our SDK Changelog.

Groovy - Huawei included

// Huawei included
 implementation 'androidx.lifecycle:lifecycle-process:2.8.7'
 implementation 'androidx.work:work-runtime:2.9.1'
 implementation 'androidx.security:security-crypto:1.1.0-alpha06'

 implementation 'com.google.firebase:firebase-messaging:24.1.0'
 implementation 'com.google.android.gms:play-services-location:21.3.0'
 implementation 'com.google.android.play:review:2.0.2'

 implementation 'com.useinsider:insider:16.0.3'

 // Huawei HMS — minimum versions that ship 16 KB page-aligned native libraries.
 implementation 'com.huawei.hms:push:6.13.0.300'
 implementation 'com.huawei.hms:ads-identifier:3.4.69.300'
 implementation 'com.huawei.hms:location:6.13.0.300'

Kotlin - Huawei included

// Huawei included
 implementation("androidx.lifecycle:lifecycle-process:2.8.7")
 implementation("androidx.work:work-runtime:2.9.1")
 implementation("androidx.security:security-crypto:1.1.0-alpha06")

 implementation("com.google.firebase:firebase-messaging:24.1.0")
 implementation("com.google.android.gms:play-services-location:21.3.0")
 implementation("com.google.android.play:review:2.0.2")

 implementation("com.useinsider:insider:16.0.3")

 // Huawei HMS — minimum versions that ship 16 KB page-aligned native libraries.
 implementation("com.huawei.hms:push:6.13.0.300")
 implementation("com.huawei.hms:ads-identifier:3.4.69.300")
 implementation("com.huawei.hms:location:6.13.0.300")

Groovy - nh

//non-Huawei
 implementation 'androidx.lifecycle:lifecycle-process:2.8.7'
 implementation 'androidx.work:work-runtime:2.9.1'
 implementation 'androidx.security:security-crypto:1.1.0-alpha06'

 implementation 'com.google.firebase:firebase-messaging:24.1.0'
 implementation 'com.google.android.gms:play-services-location:21.3.0'
 implementation 'com.google.android.play:review:2.0.2'

 implementation 'com.useinsider:insider:14.3.0-nh'

Kotlin - nh

// non-Huawei
 implementation("androidx.lifecycle:lifecycle-process:2.8.7")
 implementation("androidx.work:work-runtime:2.9.1")
 implementation("androidx.security:security-crypto:1.1.0-alpha06")

 implementation("com.google.firebase:firebase-messaging:24.1.0")
 implementation("com.google.android.gms:play-services-location:21.3.0")
 implementation("com.google.android.play:review:2.0.2")

 implementation("com.useinsider:insider:16.0.3")

Sync

Add below permissions to your AndroidManifest.xml file.

<uses-permission android:name="android.permission.INTERNET"/>
<!-- Required to display notifications on Android 13+ -->
 <uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<!-- Optional for Geofence -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />