--- title: "Getting Started - Android" slug: "getting-started-android-1" updated: 2026-04-14T17:26:29Z published: 2026-04-14T17:26:29Z canonical: "ignite.ticketmaster.com/getting-started-android-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://ignite.ticketmaster.com/llms.txt > Use this file to discover all available pages before exploring further. # Getting Started - Android ## Getting Started with Tickets SDK for Android This guide walks you through integrating the Ticketmaster Tickets SDK into your Android application. By the end of this guide, you'll have the SDK installed and displaying tickets in your app. ## Prerequisites Before you begin, ensure you have: - **Android API 28+** (minSdk) - **Kotlin 1.9+** - **Ticketmaster API Key** > **Note:** The SDK uses Jetpack Compose internally. Your app does not need to use Compose, but the SDK's fragments include Compose-based UI. --- ## What You'll Build In this guide, you'll: 1. Add the SDK dependencies to your project 2. Initialize the SDK in your Application class 3. Configure Authentication SDK (required dependency) 4. Configure Tickets SDK with branding 5. Display the tickets view in your app 6. Verify your integration --- ## Step 1: Configure SDK The Tickets SDK consists of three components that work together: - **tickets** - Main Tickets SDK (includes Authentication SDK) - **authentication** - User login and token management - **secure-entry** - Secure barcode rendering (SafeTix, QR codes) ### 1.1 Add JitPack Repository In your project-level `settings.gradle.kts` (or `settings.gradle`): ```kotlin dependencyResolutionManagement {    repositories {        google()        mavenCentral()        maven { url = uri("https://jitpack.io") }    } } ``` Or in your project-level `build.gradle` (legacy): ```groovy allprojects {    repositories {        google()        mavenCentral()        maven { url 'https://jitpack.io' }    } } ``` ### 1.2 Add SDK Dependencies In your app-level `build.gradle.kts`: ```kotlin dependencies {    // Ticket Master Tickets SDK    implementation("com.ticketmaster.tickets:tickets:X.X.X") } ``` Or toml versions file: ```kotlin dependencies {    // Tickets SDK    implementation(libs.ticketmaster.tickets) } ``` ```kotlin [versions] ticketmaster-tickets = "X.X.X" [libraries] ticketmaster-tickets = { module = "com.ticketmaster.tickets:tickets", version.ref = "ticketmaster-tickets" } ``` > **Note:** Check the [Android Change Log](/v1/docs/android-tickets-change-log) for the latest version numbers. ### 1.3 Add API Key, Team Name and Team Colors Add your API key , Team Name and Colors to `local.properties` (don't commit this to source control): ```gradle config.consumer_key = consumer_key config.team_name = tem_name config.branding_color= #color ``` Reference it in your `build.gradle.kts`: ```kotlin android {    defaultConfig {         if (rootProject.file("local.properties").exists()) {                val properties = Properties().apply {                    rootProject.file("local.properties").inputStream().use { load(it) }                }                // Tickets SDK Setup                val consumerKey = properties["config.consumer_key"] as String?                val teamName = properties["config.team_name"] as String?                val brandingColor = properties["config.branding_color"] as String?                println("branding color: $brandingColor")                buildConfigField("String", "CONSUMER_KEY", "\"$consumerKey\"")                buildConfigField("String", "TEAM_NAME", "\"$teamName\"")                buildConfigField("String", "BRANDING_COLOR", "\"$brandingColor\"")            }    }    buildFeatures {        buildConfig = true    } } ``` ### 1.4 Add Login Screen and URL Scheme to Manifest If using Modern Accounts, (Host, Archtics or MicroFLex) add “ModernAccountsLoginScreen”: ```xml                                                                                                                 ``` If using SportXR, add “SportXRLoginScreen”: ```xml                                                                                                                                 ``` > **Note:** You can find your url scheme in your API key team settings. ### 1.5 Sync and Build After adding dependencies: 1. Click **Sync Now** in Android Studio 2. Build the project to verify dependencies resolve correctly --- ## Step 2: Initialize SDK Singleton The Tickets SDK requires initialization in your `Application` class before any other SDK calls. ### 2.1 Create Application Class (If not previously created) If you don't have an Application class, create one: ```kotlin class MyApplication : Application() {    override fun onCreate() {        super.onCreate()        // REQUIRED: Initialize SDK singleton        TicketsSDKSingleton.init(this)    } } ``` ### 2.2 Register in AndroidManifest.xml ```xml ``` ### 2.3 Alternatively, Initialize TicketsSDKSingleton in your Activity (Not recommended) ```kotlin class MainActivity : AppCompatActivity() {    override fun onCreate(savedInstanceState: Bundle?) {        TicketsSDKSingleton.init(this.application)        setContentView(R.layout.activity_main)    } } ``` > **Important:** You must call `TicketsSDKSingleton.init()` before using any other SDK methods. Failing to do so will result in runtime crashes. --- ## Step 3: Configure Authentication SDK The Tickets SDK depends on Authentication SDK for user login and API access. You must configure Authentication SDK **before** configuring Tickets SDK. ### 3.1 Build Authentication Client ```kotlin class MainActivity : AppCompatActivity() {    override fun onCreate(savedInstanceState: Bundle?) {        super.onCreate(savedInstanceState)        setContentView(R.layout.activity_main)        setupAuthenticationSDK()    }    private fun setupAuthenticationSDK() {        lifecycleScope.launch {            createTMAuthenticationBuilder().build(this@MainActivity)                .fold(                    onSuccess = { authentication ->                        //after succesfully setting up Authentication, launch Tickets SDK                        setupTicketsSDKClient(authentication)                    },                    onFailure = {                        //Custom Logic for failure                    }                )        }    }    private fun createTMAuthenticationBuilder(): TMAuthentication.Builder =        TMAuthentication.Builder(            // Your consumer key            apiKey = BuildConfig.CONSUMER_KEY,            // Team name to be displayed            clientName = BuildConfig.TEAM_NAME        )            .region(TMXDeploymentRegion.US) // Region that the SDK will use. Default is US            .environment(TMXDeploymentEnvironment.Production) } ``` ### 3.3 Configuration Options You can customize the Authentication SDK: ```kotlin private val brandingColor: Int by lazy { BuildConfig.BRANDING_COLOR.toColorInt() } TMAuthentication.Builder(            // Your consumer key            apiKey = BuildConfig.CONSUMER_KEY,            // Team name to be displayed            clientName = BuildConfig.TEAM_NAME ) .region(TMXDeploymentRegion.US) .environment(TMXDeploymentEnvironment.Production) .modernAccountsQuickLogin(true)      // Enable quick login (default: true) .modernAccountsAutoQuickLogin(true)  // Skip intro screen (default: true) .forceNewSession(false)              // Set true for multi-team apps .colors(createTMAuthenticationColors(brandingColor)) //Team colors for themeing    private fun createTMAuthenticationColors(color: Int): TMAuthentication.ColorTheme =        TMAuthentication.ColorTheme(            //The Color class is part of the Compose library            lightColors = lightColorScheme(                primary = Color(color),                secondary = Color(color),                onPrimary = Color.White // Color used for text and icons displayed on top of the primary color.            ), darkColors = darkColorScheme(                primary = Color(color),                secondary = Color(color),                onPrimary = Color.White // Color used for text and icons displayed on top of the primary color.            )        ) ``` --- ## Step 4: Configure Tickets SDK Once Authentication is configured, set up the Tickets SDK with your branding: ### 4.1 Build Tickets Client ```kotlin private suspend fun setupTicketsSDKClient(authentication: TMAuthentication) {        //After called the build function of TMAuthentication.Builder object, we validate if configuration is different        //from null, to verify if it was retrieved satisfactory a configuration file from the given params.        authentication.configuration.let {            val tokenMap = validateAuthToken(authentication)            TicketsSDKClient.Builder(                colors = createTicketsColors(brandingColor)            )                //Authentication object                .authenticationSDKClient(authentication)                //Function that generates a TicketsSDKClient object                .build(this@MainActivity).apply {                    //After creating the TicketsSDKClient object, add it into the TicketsSDKSingleton                    TicketsSDKSingleton.setTicketsSdkClient(this)                    //Validate if there is an active token.                    if (tokenMap.isNotEmpty()) {                        //If there is an active token, it launches the event fragment                        launchTicketsView()                    } else {                        //If there is no active token, it launches a login intent. Launch an ActivityForResult, if result                        //is RESULT_OK, there is an active token to be retrieved.                        TicketsSDKSingleton                            .getLoginIntent(this@MainActivity)                            ?.let { resultLauncher.launch(it) }                    }                }            /**             * For testing purposes, you can use this to set to preprod etc.             */            TicketsSDKSingleton.setEnvironment(                this,                TicketsSDKSingleton.SDKEnvironment.Production,                TicketsSDKSingleton.HostEnvironment.US            )        }        if (authentication.configuration == null) {            //custom logic for failure        }    }    private suspend fun validateAuthToken(authentication: TMAuthentication): Map {        val tokenMap = mutableMapOf()        AuthSource.entries.forEach {            //Validate if there is an active token for the AuthSource, if not it returns null.            authentication.getToken(it)?.let { token ->                tokenMap[it] = token            }        }        return tokenMap    }    private fun createTicketsColors(color: Int): TicketsColorScheme = TicketsColorScheme(        primary = TicketsColor(color.toLong()),        eventsTopBar = TicketsColor(color.toLong())    )    private val resultLauncher = registerForActivityResult(        ActivityResultContracts.StartActivityForResult()    ) { result ->        when (result.resultCode) {            RESULT_OK -> {                launchTicketsView()            }            RESULT_CANCELED -> {                //custom logic for cancelation            }        }    }    private fun launchTicketsView() {        //Retrieve an EventFragment        TicketsSDKSingleton.getEventsFragment(this@MainActivity)?.let {            supportFragmentManager.beginTransaction().replace(R.id.your_layout, it).commit()        }    } ``` --- ## Step 5: Launch Login Once configured, you can present the Tickets SDK UI. First, the user needs to log in. ### Login and Display Events ```kotlin class MainActivity : AppCompatActivity() {    override fun onCreate(savedInstanceState: Bundle?) {        super.onCreate(savedInstanceState)        setContentView(R.layout.activity_main)        setupAuthenticationSDK()        lifecycleScope.launch {            TicketsSDKSingleton.sessionExpiredDelegate.collect {                TicketsSDKSingleton.logout {                    onLogout()                }            }        }    }    private fun onLogout() {        launchLogin()    }    private fun launchLogin() {        TicketsSDKSingleton.getLoginIntent(this)?.let { resultLauncher.launch(it) }    } } ``` --- ## Step 6: Verify Your Integration ### Test Checklist 1. **Build the app**: Ensure there are no compilation errors 2. **Run the app**: Verify the SDK initializes without crashes 3. **Login**: Tap your login button - you should see the Ticketmaster login screen 4. **View tickets**: After logging in with a Ticketmaster account that has tickets, you should see events and tickets ### Troubleshooting **"Failed to initialize SDK" error:** - Verify your API key is correct - Check that you're using the right environment (Production vs Staging) - Verify JitPack repository is added correctly **Build errors / dependency resolution:** - Ensure JitPack is in your repositories - Check internet connection - Try `./gradlew clean build --refresh-dependencies` - Verify version numbers match the changelog **Crashes on launch:** - Ensure `TicketsSDKSingleton.init()` is called in Application.onCreate() - Verify Application class is registered in AndroidManifest.xml - Check that Authentication SDK is built before Tickets SDK **Login screen not appearing:** - Verify `getLoginIntent()` returns a non-null Intent - Check that SDK is fully initialized before calling login - Ensure activity is a FragmentActivity **No tickets showing after login:** - Ensure the logged-in account has purchased tickets - Check the API key has access to the correct backend (Host/Archtics) - Look for error messages in Logcat --- ## Complete Minimal Example Here's a complete minimal example that ties everything together: ```kotlin // MyApplication.kt package com.example.mytickets import android.app.Application import com.ticketmaster.tickets.ticketssdk.TicketsSDKSingleton class MyApplication : Application() {    override fun onCreate() {        super.onCreate()        TicketsSDKSingleton.init(this)    } } ``` ```kotlin import android.os.Bundle import android.util.Log import androidx.activity.result.contract.ActivityResultContracts import androidx.appcompat.app.AppCompatActivity import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview import androidx.core.graphics.toColorInt import androidx.lifecycle.lifecycleScope import com.example.ticketsminimalbuild.ui.theme.TicketsMinimalBuildTheme import com.ticketmaster.authenticationsdk.AuthSource import com.ticketmaster.authenticationsdk.TMAuthentication import com.ticketmaster.authenticationsdk.TMXDeploymentEnvironment import com.ticketmaster.authenticationsdk.TMXDeploymentRegion import com.ticketmaster.tickets.ticketssdk.TicketsColor import com.ticketmaster.tickets.ticketssdk.TicketsColorScheme import com.ticketmaster.tickets.ticketssdk.TicketsSDKClient import com.ticketmaster.tickets.ticketssdk.TicketsSDKSingleton import kotlinx.coroutines.launch import kotlin.collections.isNotEmpty class MainActivity : AppCompatActivity() {    private val brandingColor: Int by lazy { BuildConfig.BRANDING_COLOR.toColorInt() }    override fun onCreate(savedInstanceState: Bundle?) {        super.onCreate(savedInstanceState)        setContentView(R.layout.activity_main)        setupAuthenticationSDK()        lifecycleScope.launch {            TicketsSDKSingleton.sessionExpiredDelegate.collect {                TicketsSDKSingleton.logout {                    onLogout()                }            }        }    }    private fun onLogout() {        launchLogin()    }    private fun launchLogin() {        TicketsSDKSingleton.getLoginIntent(this)?.let { resultLauncher.launch(it) }    }    private fun setupAuthenticationSDK() {        lifecycleScope.launch {            createTMAuthenticationBuilder().build(this@MainActivity)                .fold(                    onSuccess = { authentication ->                        //after succesfully setting up Authentication, launch Tickets SDK                        setupTicketsSDKClient(authentication)                    },                    onFailure = {                        //Custom logic for failure                    }                )        }    }    private fun createTMAuthenticationBuilder(): TMAuthentication.Builder =        TMAuthentication.Builder(            // Your consumer key            apiKey = BuildConfig.CONSUMER_KEY,            // Team name to be displayed            clientName = BuildConfig.TEAM_NAME        )            .region(TMXDeploymentRegion.US) // Region that the SDK will use. Default is US            .environment(TMXDeploymentEnvironment.Production)    private suspend fun setupTicketsSDKClient(authentication: TMAuthentication) {        //After calling the build function of TMAuthentication.Builder object, we validate if configuration is different        //from null, to verify if it was retrieved satisfactory a configuration file from the given params.        authentication.configuration.let {            val tokenMap = validateAuthToken(authentication)            TicketsSDKClient.Builder(                colors = createTicketsColors(brandingColor)            )                //Authentication object                .authenticationSDKClient(authentication)                //Function that generates a TicketsSDKClient object                .build(this@MainActivity).apply {                    //After creating the TicketsSDKClient object, add it into the TicketsSDKSingleton                    TicketsSDKSingleton.setTicketsSdkClient(this)                    //Validate if there is an active token.                    if (tokenMap.isNotEmpty()) {                        //If there is an active token, it launches the event fragment                        launchTicketsView()                    } else {                        //If there is no active token, it launches a login intent. Launch an ActivityForResult, if result                        //is RESULT_OK, there is an active token to be retrieved.                        TicketsSDKSingleton                            .getLoginIntent(this@MainActivity)                            ?.let { resultLauncher.launch(it) }                    }                }            /**             * For testing purposes, you can use this to set to preprod etc.             */            TicketsSDKSingleton.setEnvironment(                this,                TicketsSDKSingleton.SDKEnvironment.Production,                TicketsSDKSingleton.HostEnvironment.US            )        }        if (authentication.configuration == null) {            //custom logic for failure        }    }    private suspend fun validateAuthToken(authentication: TMAuthentication): Map {        val tokenMap = mutableMapOf()        AuthSource.entries.forEach {            //Validate if there is an active token for the AuthSource, if not it returns null.            authentication.getToken(it)?.let { token ->                tokenMap[it] = token            }        }        return tokenMap    }    private fun createTicketsColors(color: Int): TicketsColorScheme = TicketsColorScheme(        primary = TicketsColor(color.toLong()),        eventsTopBar = TicketsColor(color.toLong())    )    private val resultLauncher = registerForActivityResult(        ActivityResultContracts.StartActivityForResult()    ) { result ->        when (result.resultCode) {            RESULT_OK -> {                launchTicketsView()            }            RESULT_CANCELED -> {                //custom logic for cancelation            }        }    }    private fun launchTicketsView() {        TicketsSDKSingleton.getEventsFragment(this@MainActivity)?.let { fragment ->            supportFragmentManager.beginTransaction()                .replace(R.id.your_layout, fragment)                .commit()        }    } } ``` --- ## What's Next? Now that you have the basic integration working, explore these topics: ### Essential Next Steps - [**Integration Examples**](/v1/docs/configuration-1) - Explore code examples to furhter customize your integration. - [**Sample App**](/v1/docs/sample-app-android) - Explore a complete example implementation provided by Ticketmaster. ### Advanced Features - [**Analytics**](/v1/docs/analytics-android) - Track user behavior and page views - [**Modules**](/v1/docs/modules-overview) - Add custom content to the tickets page - [**Multi-Backend Support**](/v1/docs/authentication-1#multiteam-authentication) - Support multiple teams/venues ### Developer Resources - [**Android Change Log**](/v1/docs/android-tickets-change-log) - Release notes and updates --- ## Need Help? - **Support or Issues:** Contact your Ticketmaster integration representative. - [SDK Repository](https://central.sonatype.com/artifact/com.ticketmaster.tickets/tickets) - Link to SDK Maven Central Repository. --- ## Summary You've successfully integrated the Tickets SDK! Here's what you accomplished: - Installed the SDK via Gradle with JitPack - Initialized `TicketsSDKSingleton` in your Application class - Configured Authentication SDK with your API key - Configured Tickets SDK with your branding colors - Displayed the tickets view in your app - Verified your integration works Your users can now view, manage, and use their Ticketmaster tickets directly in your app!