This guide walks you through adding the Virtual Stadium Android SDK to your project. The SDK is distributed through Sportradar's Maven repository and requires both the Data SDK and UI SDK dependencies.
The Virtual Stadium SDK is hosted in Sportradar's Maven repositories. You need to add both the Data SDK and UI SDK repositories to your project.
Add the repositories to your root-level build.gradle.kts:
build.gradle.kts (Project level):
repositories {
google()
mavenCentral()
// Virtual Stadium Data SDK
maven {
url = uri("https://artifacts.vs.sportradar.com/virtualstadium/datasdk/maven/libs")
}
// Virtual Stadium UI SDK
maven {
url = uri("https://artifacts.vs.sportradar.com/virtualstadium/uisdk/maven/libs")
}
}Alternatively, add the repositories to settings.gradle.kts:
settings.gradle.kts:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
// Virtual Stadium Data SDK
maven {
url = uri("https://artifacts.vs.sportradar.com/virtualstadium/datasdk/maven/libs")
}
// Virtual Stadium UI SDK
maven {
url = uri("https://artifacts.vs.sportradar.com/virtualstadium/uisdk/maven/libs")
}
}
}Add the UI SDK dependency to your app-level build.gradle.kts. The UI SDK includes the Data SDK as a transitive dependency.
app/build.gradle.kts:
dependencies {
// Virtual Stadium UI SDK
implementation("ag.sportradar.virtualstadium.uisdk:ui-sdk:<version>")
// Your other dependencies
implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.compose.ui:ui:1.5.4")
// ...
}Replace <version> with the latest version shown in the badge at the top of this page, or specify a specific version like 1.0.0.
The Virtual Stadium Android SDK has the following minimum requirements:
| Requirement | Version |
|---|---|
| Minimum SDK | API 24 (Android 7.0) |
| Target SDK | API 34 or higher (recommended) |
| Kotlin | 1.9.0 or higher |
| Jetpack Compose | 1.5.0 or higher (if using Compose) |
| Java Version | Java 8 or higher |
Ensure your app-level build.gradle.kts meets these requirements:
app/build.gradle.kts:
android {
compileSdk = 34
defaultConfig {
minSdk = 24
targetSdk = 34
// ...
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
compose = true // Enable if using Jetpack Compose
}
composeOptions {
kotlinCompilerExtensionVersion = "1.5.4" // Match your Compose version
}
}