Extend storage API to also handle android capacitor storage. Init capacitor app with android.
This code is mostly generated, but there are some manual edits in the android/ dir
- Camera permissions in the manifest
- main activity file is customized so the view is not edge-to-edge, i.e. we keep below the status bar
I am assuming the defaults in the generated .gitignores in the android directory are sensible. It seems like we do need a lot of these files in the repo as they could be expected to change, e.g. the camera permissions in the manifest, the main activity file, the various asset files used for splash screens and logos.
Going forward, changes would not be expected to impact so many files.
Note on storage
Originally I looked at the Preferences API, which is good for simple key value storage. However it is not recommended for a lot of storage (i.e. not really more than 1 mb).
Cashtab storage is simple key value. However with token caching, transaction history, and the ability to create an unlimited number of wallets, it could easily exceed 1mb. So, I refactored to use sqlite.
Sqlite is ... overkill for Cashtab's key value storage. But it is not expected to slow down the app at larger sizes in the way that Preferences could. Going forward...well sqlite is just way better than key value storage. Could make the app way better, store all tx history, better queries, etc. Apparently there are some ways to use sqlite in a webapp too, using wasm libs. But this kind of optimization would be for another time.
For now, we use key value store so that there is no difference in how storage is written / accessed between any supported platforms.
