Integrating the Skillz Android SDK

Integrating the Skillz Android SDK is as simple as adding a few lines of code.

While the Skillz iOS SDK requires a manual download of the framework, the Android SDK will be downloaded automatically as part of your Gradle build process. This is done by adding a few lines of code to your "build.gradle" file — namely, the Skillz Maven Repository and the SDK Dependency.

 

Step 1: Adding Required Maven Repositories

Inside your build.gradle file, add the Google and Skillz Maven Repositories like so:

buildscript {
repositories {
// The Google Maven repository must be included first
google()

// Other repositories...
}
}

repositories {
// The Google Maven repository must be included first
google()
maven {
url 'http://nexus.skillz.com/content/groups/public/'
}

// Other repositories..
}

The Google Maven repository (re: google()) must be listed first in both sections as Gradle will not look past the first Maven repository if it finds an older version of a dependency.

Step 2: Adding the Skillz SDK Dependency

Next, add the Skillz library as a dependency. In this step, you must choose to add either the Stable build or the Beta build of the Skillz Android SDK. If you’re not sure which build is right for you, click here to find the release notes on each build. (For managed accounts, please reach out to your Skillz Account Manager for guidance on which build to integrate.)

To integrate the latest Stable build, add the following in the same build.gradle file you edited in Step 1:

dependencies {
    ...
    compile 'com.skillz.sdk:skillz-sdk-android:21.0.25'
    ...
}

 

Note: When upgrading to newer Skillz SDK releases in the future, you’ll need to update these version numbers (“21.0.25” in the above example) within your project.

And that’s it! You’ve now properly integrated the Skillz Android SDK into your project.