Skip to main content

MaestroKit Setup

This guide explains how to integrate MaestroKit into your Android application.

Prerequisites

Ensure the following before you begin:

  • Android Studio installed.
  • An Android app project set up with .
android {
//If build ask for compile sdk update update it to 35
compileSdk 35
minSdk 21
targetSdk 34
}
  • Access to the private MaestroKit SDK.

Installing

Manual Adding the Library

  1. Obtain the .aar file.
  2. Copy the .aar file to the libs directory inside app folder.
  3. In build.gradle:
    implementation files("libs/MaestroKit.aar")
def leanbackVersion = "1.0.0"
def retrofitVersion = "2.11.0"
def exoplayerVersion = "2.19.1"
def kotlinVersion = "1.9.0"
def coroutinesVersion = "1.3.9"
def glideVersion = "4.16.0"
def lifecycleVersion = "2.8.2"
def qrgenVersion = "3.0.1"
def paperdbVersion = "2.7.2"
def playServicesAdsVersion = "18.1.0"
def timberVersion = "1.0.0"
def coreKtxVersion = "1.15.0"
def appcompatVersion = "1.7.0"
def materialVersion = "1.12.0"
def activityVersion = "1.10.0"
def constraintlayoutVersion = "2.2.0"



// AndroidX Core KTX
implementation "androidx.core:core-ktx:$coreKtxVersion"

// AndroidX AppCompat
implementation "androidx.appcompat:appcompat:$appcompatVersion"

// Material Components
implementation "com.google.android.material:material:$materialVersion"

// AndroidX Activity
implementation "androidx.activity:activity:$activityVersion"

// AndroidX ConstraintLayout
implementation "androidx.constraintlayout:constraintlayout:$constraintlayoutVersion"


// Leanback library
implementation "androidx.leanback:leanback:$leanbackVersion"

// Retrofit and Gson converter
implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"

// Kotlin Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"

// Glide for image loading
implementation "com.github.bumptech.glide:glide:$glideVersion"

// Kotlin Reflect
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"

// Lifecycle components
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-livedata-core-ktx:$lifecycleVersion"

// QR Code generator
implementation "com.github.kenglxn.QRGen:android:$qrgenVersion"

// ExoPlayer
implementation "com.google.android.exoplayer:exoplayer-core:$exoplayerVersion"
implementation "com.google.android.exoplayer:exoplayer-ui:$exoplayerVersion"
implementation "com.google.android.exoplayer:exoplayer-hls:$exoplayerVersion"

// PaperDB
implementation "io.github.pilgr:paperdb:$paperdbVersion"

// Google Play Services Ads Identifier
implementation "com.google.android.gms:play-services-ads-identifier:$playServicesAdsVersion"

// Timber for logging
implementation "com.jakewharton.timber:timber:$timberVersion"

```

also in settings.gradle
```gradle
repositories {
maven { url "https://your-private-repo-url" }
}
```
  1. Sync the project with Gradle.

Gradle Dependency (Private Repo)

  1. In project-level build.gradle, add your private repository:
    repositories {
    maven { url "https://your-private-repo-url" }
    }
  2. In app-level build.gradle:
    implementation 'com.maestro:maestrokit:1.0.0'
  3. Sync the project.

JCenter Integration (Deprecated)

  1. In project-level build.gradle, add JCenter:
    repositories { jcenter() }
  2. In app-level build.gradle:
    implementation 'com.maestro:maestrokit:1.0.0'

Distributing Secure Credentials

  1. Store sensitive credentials in gradle.properties:
    repoUsername=username
    repoPassword=password
  2. In build.gradle, reference the credentials:
    maven {
    url "https://private-repo-url"
    credentials {
    username project.repoUsername
    password project.repoPassword
    }
    }

The MaestroKit SDK is now integrated. Contact your support team for issues.