Skip to main content
Skip table of contents

Adding CONNECT Player to your application

To add the CONNECT Player to your application, you need to:

Update the build.gradle

The illustrations below show how to modify the build.gradle to work with the Connect Player SDK for Android. For the development tools, current dependencies and minimum build configuration required, see (5.32.x) Prerequisites and dependencies.

  1. In Project view, select appbuild.gradle. In the android block, ensure compileSdkVersion is set to 32 and minSdkVersion is set to 21 .

    GROOVY
    ...
    android {
      compileSdkVersion 32 // Update this version as per the integration guide
      defaultConfig {
        minSdkVersion 21
        ...
      }
      ...
    }
    ...
  2. Add the following lines (if not already present):

    GROOVY
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_8
            targetCompatibility JavaVersion.VERSION_1_8
        }
  3. Create a buildScript block with a dependency set for the latest gradle plugin.

    GROOVY
    buildscript {
      repositories {
         google()
         mavenCentral()
       }
      dependencies {
        classpath 'com.android.tools.build:gradle:7.0.4'
      }
    }
  4. In the dependencies block, add the following implementations:

    GROOVY
            implementation fileTree(dir: 'libs', include: ['*.aar'])
            implementation ("com.google.guava:guava:31.0.1-android") { // Update dependencies' values as per top page of the integration guide
                  exclude group: 'com.google.code.findbugs', module: 'jsr305'
                  exclude group: 'org.checkerframework', module: 'checker-compat-qual'
                  exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
                  exclude group: 'com.google.j2objc', module: 'j2objc-annotations'
                  exclude group: 'org.codehaus.mojo', module: 'animal-sniffer-annotations'
    			} 
  5. On completion, sync the build.gradle.

Next step: Edit the MainActivity file.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.