Preface
Making a signed APK with the Cordova is not an easy thing. But if you are capable of making a decent game in construct you should be able to follow this tutorial.
This manual my seem long. But most action only need to be done once. After you got your game signed and ready to publish, updating it goes much quicker.
During this manual it is very helpful to see the hidden folders and file extensions in your file explorer. How to make them visible? Follow the instructions given on this page:
https://www.technipages.com/show-hidden-files-windows
The file extension checkbox is right above the hidden items checkbox.
In this manual we are going to use Windows Powershell. I think the old command prompt will work as well. To start Powershell Press [Windows key]+[X] and then click on Windows PowerShell.
During the build process you have to specify a targeted(required) and a minimum(optional) SDK/android API. The targeted SDK is the android API the APK will be build for. But it also will work on older versions. Up to the minimum version you give. 4.1 is the minimum version supported by cordova (april 2018). From august 2018 Google requires all new apps and updates to be targeted at an SDK that isn’t older then 1 year.
From android 5 and up there is an internal ‘browser simulator’ So If you specify a minimum version of 5 or higher, you get one small apk.
Before android 5 the crosswalk browser simulator is needed. This runs closer to the hardware, so you get APK’s for different SOC families. And the APK’s are bigger. During install the ARM64 APK requires the crosswalk app to be installed. The ARMv7 APK for older ARM devices has the crosswalk code embedded, so it does not ask for it.
In short.
Minimal version of 5 and up: 1 APK for all.
Minimal version 4.1 and up : 5 APK’s, crosswalk install can be needed, in game experience can be smoother
Google allows publishing multiple APKs of the same app. They must be signed with the same key. But also must have different version numbers. Lucky for us Cordova already fixed the version number thing for us.
For a list of android version → API level see : https://source.android.com/setup/start/build-numbers
I do not now everything. And I make mistakes. So if there are incorrect instructions / statements in this manual please let me know so I can update this manual.
Add a few places I added a question for conformation / clarification about something’s. If you know the answer, please let me know.