I looked through the game maker forum but could not find anything that explained in detail about Multiple APK support which plays a highly significant role in reducing APK file size significantly (Yes! I had to say significant twice!). So here goes how I am utilizing Mutliple APK support which is enabled by Game Maker Studio and fully supported by Google Play.
Why Multiple APK and what are you talking about?
To keep it short and simple – Instead of creating one Single APK which supports Armv5, Armv7, x86 and Mips devices, we will create 4 different APKs, 1 for each architecture.
OK! But Why?
Because, the more architectures your APK supports, the more devices it can reach. And an APK which supports all four architectures will weigh around 20MB when your game just has to weigh 5MB. ( A 5MB flappy cuckoo will get downloaded way more than a 20MB flappy cuckoo
) Read this Does App size matter?
So I have to create 4 different App Listings in Google Play like say, My Game armv5, My Game armv7, My Game x86, My Game Mips?
Not at all. This is where the Google Play Advanced Mode comes to the rescue. You can upload multiple APKs for the same release as long as
- The Architecture supported is different
- The version number is different
Here is a look at what my current release looks like in Google Play. You will notice there are four versions currently in production, all at the same time. The store will take care of which APK to be downloaded by which device. ie: A person on a Armv7 device will get the APK 1.2.2 and another person on an x86 device will get the 1.2.3 version. How cool is that? 😀
This is how I take care of versioning in my games. ( Tuned to my ease and just to give you an idea but you may already have better versioning logic)
Say my version number is AA.BB.CC
- AA denotes the major release version. Incremented only when there is a major-major update going through (Starts with 1)
- BB denotes Minor release versions and acts as the most important version tracker for the game. (Starts with 0)
- Now CC is APK specific and denotes which architecture the APK supports. So it will always be either 1, 2, 3 or 4 and that’s it.
So for every release there will 4 sub versions, one for each architecture.
For Example, When I am ready to release 1.1 , these are my usual Steps and changes made to Global Settings for Android in Game Maker Studio
- Step 1: Change version to 1.1.1 > Select Architecture Armv5 > Create APK > MyGame_v5.apk
- Step 2: Change version to 1.1.2 > Select Architecture Armv7 > Create APK > MyGame_v7.apk
- Step 3: Change version to 1.1.3 > Select Architecture x86 > Create APK > MyGame_x86.apk
- Step 4: Change version to 1.1.4 > Select Architecture Mips > Create APK > MyGame_mips.apk
Got it! Now How do I upload it all to Google Play?
Head to the Google Developer Console > All Applications > Your Application > APK tab where you would usually upload an APK to production or Beta or Alpha. Now switch to ‘ADVANCED MODE’
Now here is the tricky part. You have to upload each APK one by one, the lowest version first. ie: based on the example above – MyGame_v5.apk(1.1.1) goes first , then MyGame_v7.apk(1.1.2) , MyGame_x86.apk (1.1.3), MyGame_mips.apk (1.1.4). Now Hit on Publish and you are done!!
Sometimes Google Play scolds you when you are uploading your next set of APKs. This is because you haven’t deactivated your previous APK that is in production for a particular architecture and is causing a conflict. So, everytime you are at the console to upload the APK, just deactivate all the APKs that are active or just the one’s you are trying to upgrade.
Hope this helps someone and shoot me a question, if I have confused you! Cheers and keep making those wonderful games!