Android app (TWA) in android/, built with podman; serve assetlinks.json for it
This commit is contained in:
parent
44708d5f3c
commit
7900bf5b3e
21 changed files with 313 additions and 0 deletions
22
README.md
22
README.md
|
|
@ -163,6 +163,28 @@ rsvg-convert -w 512 -h 512 icon-maskable.svg -o icon-maskable-512.png
|
|||
rsvg-convert -w 180 -h 180 icon-maskable.svg -o apple-touch-icon.png
|
||||
```
|
||||
|
||||
### Android app
|
||||
|
||||
`android/` is the site as an Android app: a Trusted Web Activity, which opens the public site in
|
||||
the phone's Chrome, full screen, with no code of its own (Google's `androidbrowserhelper` does it
|
||||
all). Build it with podman:
|
||||
|
||||
```
|
||||
android/build.sh
|
||||
```
|
||||
|
||||
That builds an image with JDK 17, the Android SDK and Gradle, and writes a signed
|
||||
`android/out/simpleadmin-web.apk`. The signing key is kept outside the repo, in
|
||||
`~/.config/simpleadmin-web/android/` (`release.jks` and its `password`), and made on the first run.
|
||||
Back it up: an APK signed with another key won't install over the old one. Then:
|
||||
|
||||
- Set `SAW_ANDROID_PACKAGE` and `SAW_ANDROID_CERT_SHA256` (the fingerprint `build.sh` prints) so
|
||||
the panel serves `/.well-known/assetlinks.json`. Without it, Chrome shows its URL bar over the app.
|
||||
- Bump `versionCode` in `android/app/build.gradle` for every APK you hand out.
|
||||
- The site and start page are at the top of `android/app/build.gradle`; never change `applicationId`.
|
||||
|
||||
The app needs Chrome (or another browser with TWA support) on the phone.
|
||||
|
||||
## Limitations and caveats
|
||||
|
||||
- **Tested against a real MySQL 8.4** with SimpleAdmin 1.8.2b's migrations applied, and a fake game
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue