ExoPlayer (Android)

Getting started


Gumlet insights integration with Exoplayer for Android native application helps to collect video
insights using Gumlet platform.

Follow below steps to integrate gumlet-insights-sdk-exoplayer in your android application.

Step 1: Add Gumlet Insights SDK dependency

To use "Gumlet Exoplayer Collector" add below line inside your main project (app) build.gradle

dependencies {
    implementation 'com.gumlet.gumlet-insights-sdk-exoplayer:collector-exoplayer:1.0.3'

Step 2: Initialise the Gumlet SDK

// Add an import for Gumlet Insights library
import com.gumlet.insights.GumletInsightsConfig;
import com.gumlet.insights.exoplayer.ExoPlayerCollector;

// Initialize the Exoplayer
SimpleExoPlayer.Builder exoBuilder = new SimpleExoPlayer.Builder(this);
player = exoBuilder.build();

// Create Gumlet Insights config object
gumletInsightsConfig = new GumletInsightsConfig("<PROPERTY-ID>",this);

// Create Gumlet Insights Collector object
gumletAnalytics = new ExoPlayerCollector(gumletInsightsConfig, MainActivity.this);

// Attach ExoPlayer to Gumlet Inightss Collector object

// Attach the media to the player and call the play function for ExoPlayer