Updating your game from 20.x to 21.x on Android

Note: if you’re on an earlier SDK version than 20.x and are having troubles, reach out to integrations@skillz.com.

This document is for developers who have previously integrated the v20.x Android SDK and want to update their integration using the latest v21.x release of our Android SDK. The latest version of the Android SDK now provides support for player experience levels, user interface improvements, and miscellaneous bug fixes.

Step 1:

Ensure Android SDK version compatibility

In your build.gradle file, you’ll need to update your compileSdkVersion and targetSdkVersion to 27. 

android {
  compileSdkVersion 27 

   defaultConfig {
       applicationId “com.skillzgames.caverun”
       minSdkVersion 19
       targetSdkVersion 27
   }

}

 

Step 2:

Upgrade to Android 8

Since our SDK now uses Android 8, you’ll also need to update to Android 8 to ensure compatibility.

 

android {

   compileOptions {
       sourceCompatibility JavaVersion.VERSION_1_8
       targetCompatibility JavaVersion.VERSION_1_8
   }

}

 

Step 3:

Point your app to the Skillz SDK version 21.x

In your build.gradle file, update your Skillz dependency to be the latest SDK version.

 

android {

   dependencies {
       …
        implementation ‘com.skillz.sdk:skillz-sdk-android:21.0.14’
       …
   }

}

 Note: The newest version can be found in https://developers.skillz.com/downloads.

 

Step 4:

Update your proguard.txt

This update makes use of the libraries shown below. Please add the following lines to your existing Proguard file so that the Android project can compile correctly.

-keep public class com.dylanvann.fastimage.* { *; }
-keep public class com.dylanvann.fastimage.** { *; }
-keepclassmembers enum * {
   public static **[] values();
   public static ** valueOf(java.lang.String);
}

-keep class com.scottyab.rootbeer.** { *; }

 

Custom Theming Warning - If your game takes advantage of our custom themed SDK feature, you will need to build an .ipa or .apk with the new SDK version, upload it to our developer portal, and sync your game to Production. Prior to that, you may see artifacts within your custom theme.

What does the Android SDK Upgrade mean for you?

The following steps explain what tasks you may need to complete to upgrade your application to Android SDK 27. Since 20.x to 21.x is moving from Android API 22 to Android API 27, there are various changes you may need to incorporate into your game to fulfill all compatibility concerns.

 

Runtime Permissions

The biggest change here is that any permissions you request from the user will now need be requested at runtime, rather than at install time. Documentation for that can be found here

 

Background Operations

As of Android 26, if your game uses background processing, you’ll need to ensure they conform to the newest protocols.  Documentation for that can be found here.

After completing these steps, your game will be compatible with Android 27, and can compile your game without errors.

 

Additional Resources

If you are having issues even after these steps, docs from Google explaining the changes in each SDK version can be found below: 

 

Additional Questions?

You have now updated your project to 21.x. You should now be able to re-export your projects to both iOS and Android. If you encounter a problem, please email integrations@skillz.com with a detailed description of the issue you are encountering.