Setup
This guide walks you through setting up the Quickplay Player SDK for Android in your project. You'll configure Gradle dependencies, JFrog repositories, and ProGuard rules to ensure proper integration.
What's included
The library package includes the following:
- Android Archive Library
Debug(.aar)Release(.aar)- Sample App
Support
The SDK has the following version requirements:
- Minimum Android SDK Version: 21
- JVM Target Version: 17
- Recommended Gradle version: x.x.x
Gradle build system changes
Update your Gradle build files to include the required dependencies and configurations for the Quickplay Player SDK.
Note: The dependency versions shown below are placeholders (
x.x.x). For the most current and accurate version numbers, refer to the Versions page, which contains the latest auto-generated dependency information.
- Root
build.gradle
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal() //https://plugins.gradle.org/m2/
}
dependencies {
classpath 'com.android.tools.build:gradle:x.x.x'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10' (or 2.1.0 if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
}
}
- Application's
build.gradle
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt' (replace with id("com.google.devtools.ksp").version("2.1.10-1.0.30") if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
}
repositories {
flatDir {
google()
mavenCentral()
// The FL libraries can go into the below folder
dirs "$rootDir/libs/fl"
}
}
android {
compileSdkVersion 34 (or 35 if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}
defaultConfig {
// application specific configs
minSdkVersion 21
targetSdkVersion 34 (or 35 if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
}
packagingOptions {
exclude 'META-INF/kotlin-stdlib.kotlin_module'
}
buildTypes {
debug {
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt')
}
release {
debuggable false
minifyEnabled true
signingConfig signingConfigs.Default
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-release.pro'
}
}
}
dependencies {
// FL Dependencies
debugImplementation(name:'fl-foundation-debug', ext:'aar')
releaseImplementation(name:'fl-foundation', ext:'aar')
debugImplementation(name:'fl-player-interface-debug', ext:'aar')
releaseImplementation(name:'fl-player-interface', ext:'aar')
debugImplementation(name:'fl-player-debug', ext:'aar')
releaseImplementation(name:'fl-player', ext:'aar')
//moshi library => Transitive dependency for FL's foundation Library
implementation 'com.squareup.moshi:moshi:x.x.x'
kapt 'com.squareup.moshi:moshi-kotlin-codegen:x.x.x' (replace with ksp "com.squareup.moshi:moshi-kotlin-codegen:x.x.x" if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
kaptTest 'com.squareup.moshi:moshi-kotlin-codegen:x.x.x' (remove if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
//okhttp3 => Transitive dependency for FL's foundation Library
implementation 'com.squareup.okhttp3:okhttp:x.x.x' (or x.x.x if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
// Exoplayer Dependencies
implementation 'com.google.android.exoplayer:exoplayer-core:x.x.x'
implementation 'com.google.android.exoplayer:exoplayer-ui:x.x.x'
implementation 'com.google.android.exoplayer:exoplayer-dash:x.x.x'
implementation 'com.google.android.exoplayer:exoplayer-hls:x.x.x'
implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:x.x.x'
implementation 'com.google.android.exoplayer:extension-mediasession:x.x.x'
// Media3 Dependencies (if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
implementation 'androidx.media3:media3-common:x.x.x'
implementation 'androidx.media3:media3-exoplayer:x.x.x'
implementation 'androidx.media3:media3-exoplayer-ima:x.x.x'
implementation 'androidx.media3:media3-exoplayer-dash:x.x.x'
implementation 'androidx.media3:media3-exoplayer-hls:x.x.x'
implementation 'androidx.media3:media3-exoplayer-smoothstreaming:x.x.x'
implementation 'androidx.media3:media3-sessione:x.x.x'
implementation 'androidx.media3:media3-cast:x.x.x'
implementation 'androidx.media3:media3-ui:x.x.x'
implementation 'androidx.media3:media3-datasource:x.x.x'
implementation 'androidx.media3:media3-datasource-cronet:x.x.x'
implementation 'androidx.media3:media3-datasource-okhttp:x.x.x'
implementation 'androidx.media3:media3-extractor:x.x.x'
// MANDATORY DEPENDENCY FOR AutoMusicService initialization
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-guava:x.x.x'
// Kotlin dependencies
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:x.x.x' (or x.x.x if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
// Kotlin Coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:x.x.x' (or x.x.x if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:x.x.x' (or x.x.x if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
// Android Dependencies
implementation 'androidx.media:media:x.x.x' (if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
implementation 'androidx.core:core-ktx:x.x.x'
implementation 'androidx.appcompat:appcompat:x.x.x'
implementation 'androidx.annotation:annotation:x.x.x'
implementation 'androidx.lifecycle:lifecycle-extensions:x.x.x'
// MANDATORY DEPENDENCY FOR enabling automatic deletion of all the downloads which expired
implementation 'androidx.work:work-runtime-ktx:x.x.x'
}
Set up Quickplay Player libraries via JFrog
To access Quickplay Player libraries through JFrog, you need to configure your credentials and repository URLs in your Gradle files.
- Add the following properties with your JFrog credentials to the
gradle.propertiesfile:
jFrogUser=<USERNAME>
jFrogPassword=<PASSWORD>
- Add the following snippet to the
build.gradlefile:
allprojects {
repositories {
....
maven {
url "https://firstlight.jfrog.io/artifactory/fl-android-sdk-libs-release"
credentials {
username = "${rootProject.jFrogUser}"
password = "${rootProject.jFrogPassword}"
}
}
maven {
url "https://firstlight.jfrog.io/artifactory/fl-android-sdk-libs-snapshot"
credentials {
username = "${rootProject.jFrogUser}"
password = "${rootProject.jFrogPassword}"
}
}
}
}
On some devices, the Android runtime may report an issue with "desugaring" of
the runtime artifacts, and you may experience crashes (for example,
"java.lang.AbstractMethodError"). To resolve this issue, add the following
entry to the gradle.properties file:
android.useFullClasspathForDexingTransform=true.
For more information, see the useFullClasspathForDexingTransform description.
The Quickplay, Moshi, OkHttp3, Kotlin, and ExoPlayer (for QuickPlay Player SDK version 7.0.x) or Media3 (for QuickPlay Player SDK version 7.1.x) dependencies are mandatory for basic playback features. You can add the Android dependencies mentioned above (and more) as required based on your UI preferences. As you add more features or FL libraries, you must also add the corresponding dependent libraries.
ProGuard configuration
QuickPlay Player SDK code uses ProGuard rules to obfuscate sensitive internal
logic and only public APIs aren't obfuscated. When you build the final version
of your app ("release" build type) and enable R8 code shrinking, obfuscation,
and optimization by setting isMinifyEnabled flag to true (see the
build.gradle example above), you may encounter a runtime crash as a result of
Quickplay Player library public API being obfuscated. To avoid that, you must
add the following rule to your application project's proguard rules file:
-keep class com.quickplay.vstb7.** {*;}
If you're using the fl-analytics library, you must also add the following rules to your application project's proguard rules file:
-keep class com.datazoom.collector.** {*;}
-keep class com.dz.collector.android.** {*;}