When submitting your game to the the Google Play store, you will see that it currently limits the upload size of an individual application to 100MB. However there are larger games out there that you can download and they get around this limitation by using APK Expansions.
An APK Expansion splits your final game into two parts, the *.apk and the expansion *.zip with all the game assets placed in the separate expansion file in order to reduce the overall size of the initial *.apk package. Now, when the user installs your game and then runs it for the first time, they will be prompted to download the package either over WifFi or from their mobile carrier, and once downloaded it will be installed on the device to create the full game.
This functionality is only available to you on the Android target platform, and can be activated by clicking the checkbox for it that you will find in the Global Game Settings Licencing Tab. You will also have to click the Enable Google Licencing checkbox and add your public key too.
There are a few conditions attached to this option, which we list below:
It is also worth noting that this option will create an expansion file regardless of the final size of your .apk. However there is no point using this functionality if your final .apk is less than 50MB or if you are not planning on uploading it to Google Play, since this feature is exclusively for use on that store.
Once Create Application has completed compiling your game, you will find that as well as the usual “<ProjectName>-<Config>.x.y.z.apk” file, there will be an additional “<ProjectName>-<Config>.x.y.z-assets.zip” output to the chosen folder for your game. Now, when you upload the .apk file to the Google Play store from your developer dashboard, you must also upload this assets.zip file as a main expansion file (you will see that there is also a “patch” expansion file option, but this can be ignored).
This feature does have it's limits, however:
Because your application must manually download the expansion files when it first opens, it is very important that you test the feature to be sure that your game can successfully query for the URLs, download the files, save them to the device, and then access them.
To test your game and its expansion, you must first upload it to your Google Play developers dashboard as a "draft" application, and this will make your expansion files available for download. The actual procedure is as follows:
NOTE: It can take several hours before the expansion file will be available from Google Play. If you run the *.apk on the device during this time, the download will fail, because Google Play will report that there is no file available.
Once the download is complete, the game will launch and you should be able to play as normal. That doesn't mean to say that from now on everything is perfect, as there are also a few things to note about the content downloaded in this way:
And that's it! The 50MB limit that the Google Play store imposes is no longer an issue for those of you making larger games.