Setup
What's Included
The library package would include the following:
- Android Archive Library
Debug
(.aar)Release
(.aar)- Sample App
Support
- Minimum Android SDK Version : 21 (or 23 if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
- JVM Target Version : 17
- Recommended Gradle version : 8.2.1 (8.9.0 if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
Gradle Build System Changes
- Root
build.gradle
buildscript {
repositories {
google()
mavenCentral()
gradlePluginPortal() //https://plugins.gradle.org/m2/
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1' (8.9.0 if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
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 (or 23 if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
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:1.15.0'
kapt 'com.squareup.moshi:moshi-kotlin-codegen:1.15.0' (replace with ksp "com.squareup.moshi:moshi-kotlin-codegen:1.15.2" if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
kaptTest 'com.squareup.moshi:moshi-kotlin-codegen:1.15.0' (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:4.10.0' (or 4.12.0 if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
// Exoplayer Dependencies
implementation 'com.google.android.exoplayer:exoplayer-core:2.19.1'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.19.1'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.19.1'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.19.1'
implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.19.1'
implementation 'com.google.android.exoplayer:extension-mediasession:2.19.1'
// Media3 Dependencies (if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
implementation 'androidx.media3:media3-common:1.5.1'
implementation 'androidx.media3:media3-exoplayer:1.5.1'
implementation 'androidx.media3:media3-exoplayer-ima:1.5.1'
implementation 'androidx.media3:media3-exoplayer-dash:1.5.1'
implementation 'androidx.media3:media3-exoplayer-hls:1.5.1'
implementation 'androidx.media3:media3-exoplayer-smoothstreaming:1.5.1'
implementation 'androidx.media3:media3-sessione:1.5.1'
implementation 'androidx.media3:media3-cast:1.5.1'
implementation 'androidx.media3:media3-ui:1.5.1'
// MANDATORY DEPENDENCY FOR AutoMusicService initialization
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.10.0'
// Kotlin dependencies
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10' (or 2.1.0 if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
// Kotlin Coroutines
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4' (or 1.10.0 if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4' (or 1.10.0 if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
// Android Dependencies
implementation 'androidx.media:media:1.7.0' (if targeting QuickPlay Player SDK version 7.1.x with Media3 and Kotlin K2 integration)
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.annotation:annotation:1.5.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
}
Setup Quickplay Player Libraries via JFrog
- Add following properties with your jfrog credentials in
gradle.properties
file.
jFrogUser=<USERNAME>
jFrogPassword=<PASSWORD>
- Add the following snippet to the
build.gradle
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}"
}
}
}
}
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. According to the UI preferences, the above-mentioned Android dependencies (and more) can be added as required. As more features / FL Libraries are added, the corresponding dependent libraries should also be added.
QuickPlay Player SDK code uses ProGuard rules to obfuscate sensitive internal logic and only public APIs are not obfuscated. When building the final version of your app (“release” build type) you 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. In order to avoid that you must add to your application project’s proguard rules file a new rule: -keep class com.quickplay.vstb7.** {*;}
If using fl-analytics library you must add to your application project’s proguard rules file a new rule
-keep class com.datazoom.collector.** {*;}
-keep class com.dz.collector.android.** {*;}