Flux Panda SDK

Prerequisites

Install or update Android Studio to its latest version.

Make sure that your project meets these requirements:

  • Minimum SDK level 21 (Lollipop) or higher
  • Target SDK level 30 (Android 11) or higher
  • Compile SDK Version 30 (Android 11) or higher

Set up a physical device or use an emulator to run your app.

Add Flux Panda SDK to your app

Declare the dependencies for the Flux Panda SDK in your app.

  • Declare it in your settings.gradle file.
dependencyResolutionManagement {
	.....    
  repositories {
  	.....
    .....
    maven {            
			url 'https://fluxpanda.jfrog.io/artifactory/fluxmobile-gradle-release'
    }
  }
}
  • Declare it in your module (app-level) Gradle file (usually app/build.gradle).
android {
  ...
  ...
  buildFeatures {
  dataBinding true
  }
  ...
  ...
}
dependencies {
	// Declare the dependency for the Flux Panda SDK for player integration
  implementation 'com.fluxpanda:sdk:0.1.0'
}

Sync your app to ensure that all dependencies have the necessary versions.

Initialize Flux Panda SDK in your app

Import the FluxMobileSDK module in your Application:

import com.fluxpanda.sdk.FluxMobileSDK

Initialize a FluxMobileSDK shared instance, typically in your app's application:onCreate: method:

FluxMobileSDK.initialize(channelId = "CHANNEL_ID", apiKey = "API_KEY") { isInitialized ->
}

To Open Flux Panda Player

Import the FluxMobileSDK module in your Activity:

import com.fluxpanda.sdk.FluxMobileSDK
import com.fluxpanda.sdk.ui.FluxMobileSDKAppCompatActivity

Extend your Activity with FluxMobileSDKAppCompatActivity:

class YourActivity : FluxMobileSDKAppCompatActivity()

To open player:

FluxMobileSDK.open(YourActivity@this, "SESSION_ID")