Categories
Uncategorized

Implementing Automatic DLC Packaging For Android

In my last blog, I explained how I got started on the DLC Packaging System, which is one of the parts of my Project. Today I will talk about how I have implemented this automatic DLC packaging for Android Play Store. If you have read my previous blog, you know Android has a new universal format for packaging called Android App Bundle (AAB). You can read more about the new format here: https://developer.android.com/guide/app-bundle. The important point for us is that it has support for Dynamic Features, which supports on-demand delivery of DLCs.

In AAB, we are utilizing the Asset Delivery Feature of Play Store. So, we need to prepare a new AAB package that will include our freeware DLC packages. Note that we cannot upload DLC packages separately (like in Steam) in Android.

Currently, ScummVM Team is creating the APK (not the AAB) for Android. So, there is a need to change some configurations to cater to our new needs. Fortunately, since we are using gradlew commands to build our Android APK, we only need to change one thing – running a different command. We need to modify the command ./gradlew assembleDebug (or assembleRelease) to ./gradlew bundleDebug (or bundleRelease). We can also add a new option for AAB, so devs can produce both APK and AAB depending on their need. E.g. we only need AAB when releasing a new version for Play Store, and the buildbot can build the APK as usual.

Once we have created our new ScummVM format, we need to add our DLC games to the AAB. Google has provided some Python scripts to do this. There are two steps involved in creating the ready-to-upload package for Android: First, prepare an intermediate DLC package using the game data files. Basically, organize files and generate the AndroidManifest.xml. Second bundle the AAB we created earlier with the intermediate DLC to produce our ready-to-upload package.

So, I modified my export-platforms.json and the master packaging script to run those provided Python scripts and set up any required dependencies. The output is a ready-to-upload AAB file.

Leave a Reply

Your email address will not be published. Required fields are marked *