Android Build Process
- Log into devlab-gen1 as devlab-gen1\sysadmin.
- Exit out of File Explorer.
- Exit out of Android Studio.
- Load Visual Studio 2019 as administrator and pull your branch.
- Run a node.js command prompt as administrator. Change directory to c:\devops\boldnetmobile.
- Update cordova - npm install -g cordova.
To build BoldNet Mobile run BuildBoldNetMobile.bat in the node.js command window (for Legacy Mobile run BuildLegacySecurityMobile.bat).
- This will copy the appropriate files in place to build BoldNet Mobile.
- Clean up from the last cordova build. NOTE: If the clean fails, make sure you have exited Android Studio and File Explorer.
- Remove the cordova android platform.
- Add the cordova android platform. This reinstalls the plugins found in the config files.
- Build a release build of the android platform with certificate signing.
- You will now have an APK and app you can load in Android Studio.
The APK can be used to install on android devices in developer mode.
At the time of writing this document, Google Play will still accept APKs but starting Nov 2021 developers will have to upload an Android App Bundle Format file. See https://developer.android.com/distribute/best-practices/develop/target-sdk.
NOTE: newer version of gradle creates the Android bundle for you so you don't have to go into Android Studio as described below.
To get an Android App Bundle File
- Start Android Studio.
- Load the BoldNet Mobile application.


- If you see a message stating that Gradle is syncing, let it finish (see bottom status bar).
- Click on the Build Variants window and switch the Active Build Variant to "release".

- Click Build->Build Bundle(s)/APK(s)->Build Bundle(s).

- Open the Event Log (easiest by clicking the bottom status bar). This will show you the status of the build and if it was successful, the location of the output.

- Click on the "locate" link and it will open the location of the Android App Bundle (aab) file. This is the file that you upload to Google Play. See Google Play for how to upload.
