Everyone keeps asking for this even though Add to Home works fine for mobile devices. In any case let's just do it and ship it off to the google play store. iOS version will follow in a subsequent diff.
* As per T1867 - this diff converts the Cashtab react codebase into an android mobile app using the Ionic Capacitor, which is a cross-platform app runtime that builds web apps that run natively in Android, iOS and the web.
* The integration of capacitor's android build workflow into the existing Cashtab build/deployment process will be looked at in a separate diff.
* The generated apk corresponding to this attached for reference
{F5183550}
{F5183549}
Android Prerequisites:
1. Running npm install will now also install ionic cli and capacitor core / cli modules
Alternatively you can just manually install them:
> npm install -g @ionic/cli
> npm install @capacitor/core @capacitor/cli --save
2. Download and install Android Studio (https://developer.android.com/studio)
3. Update the CAPACITOR_ANDROID_STUDIO_PATH environment variable to point to the location of studio.sh in your installed android studio directory
> echo export CAPACITOR_ANDROID_STUDIO_PATH="/home/[username]/[android studio installation]/bin/studio.sh" >> ~/.bashrc
Android Build:
4. Build the Cashtab project (outputs to the build folder)
> npm run build
5. Convert the Cashtab build into an Android project (outputs to the android folder)
> ionic capacitor add android
6. Open android app in android studio (Gradle sync may take a few minutes on first load)
> npx cap open android
7. Make any necessary adjustments to app metadata (versioning)
8. If you ever need to delete and rebuild the android folder, initialize Cashtab icon and splash screen branding by overwriting the default contents in '/web/cashtab/android/app/src/main/res/' with the contents of '/android/Cashtab-mobile-branding.zip'
9. Open the build menu from Android Studio and build the APK for deployment
> Select Build -> Build Bundle(s)/APK(s) -> Build APK(s)
10. Install the APK onto a physical android mobile device