Setting Up the SDK

The SDK is published to Maven Central under the group com.inkryptvideos.android.


Option A: Version Catalog - Kotlin DSL (Recommended)

This is the modern approach for projects using Kotlin DSL (.kts) and Gradle Version Catalogs. Use this for all new projects.

Step 1 - Confirm Maven Central is registered

In your root-level settings.gradle.kts, make sure mavenCentral() is listed inside dependencyResolutionManagement. New Android Studio projects already include it, no change needed in most cases:

dependencyResolutionManagement { 
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 
    repositories { 
        google()
        mavenCentral() 
    } 
}

Step 2 - Declare Versions and Libraries

Open gradle/libs.versions.toml and add the following entries:

[versions] 
inkryptVideoPlayer = "3.0.74"
fragment = "1.8.1" # Required by the SDK 
uiViewbinding = "1.6.8" # Required by the SDK 

[libraries] 
inkrypt-video-player = { module = "com.inkryptvideos.android:inkryptvideos-android", version.ref = "inkryptVideoPlayer" }
androidx-fragment = { group = "androidx.fragment", name = "fragment", version.ref = "fragment" }
androidx-ui-viewbinding = { group = "androidx.compose.ui", name = "ui-viewbinding", version.ref = "uiViewbinding" }

Run a Gradle Sync after saving this file so Android Studio picks up the new references.

Step 3 - Add Dependencies

In your app-level build.gradle.kts, add the three dependencies:

dependencies {
    implementation(libs.inkrypt.video.player)
    implementation(libs.androidx.fragment)
    implementation(libs.androidx.ui.viewbinding) 
}

Step 4 - Enable View Binding

View Binding is required to bridge the player Fragment into a Compose tree. Make sure it is enabled under buildFeatures:

android {
    buildFeatures {
        compose = true 
        viewBinding = true // Required by the SDK 
    } 
}

Run another Gradle Sync to complete the setup.

Option B: Direct Groovy Declaration (Deprecated)

This approach is deprecated. Use Option A for any new project.

Confirm the Repository

In your root-level settings.gradle, ensure mavenCentral() is declared:

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

Add the Dependency

In your app-level build.gradle:

def inkVersion = "3.0.74" 

dependencies { 
    implementation "com.inkryptvideos.android:inkryptvideos-android:$inkVersion" 
    implementation "androidx.fragment:fragment:1.8.1" 
}

AndroidManifest Configuration

Regardless of which option above you chose, add configChanges to your <activity> declaration. Without this, the player will restart on every screen rotation or resize:

<activity android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation" ... />