Skip to content
Preview. LawFive's code and server image aren't public yet, so some steps here won't work until they are.

Android and Wear OS

  • JDK 21. Newer ones are too new for the Android build tools.

  • The Android SDK, from Android Studio, or:

    Terminal window
    brew install --cask android-commandlinetools
    sdkmanager "platforms;android-37.0" "build-tools;37.0.0" "platform-tools"
  • mobile/android/local.properties, which isn’t committed:

    local.properties
    sdk.dir=/path/to/your/Android/sdk
    # Optional: build in another server instead of the hosted service.
    # lawfive.server=https://lawfive.example.com

Run these from mobile/android/, with JAVA_HOME set to JDK 21.

What Command
Build ./gradlew :app:assembleDebug
Install on a phone or emulator ./gradlew :app:installDebug
Unit tests ./gradlew :app:testDebugUnitTest
Release build ./gradlew :app:assembleRelease
Check a Google Play release tools/release-check.sh
Install over Wi-Fi tools/wifi.sh, with the phone plugged in once

Versions come from git, so a newer build always installs over an older one. A debug build has to be uninstalled before installing a release build, as they’re signed with different keys.

Terminal window
sdkmanager "emulator" "system-images;android-37.0;google_apis;arm64-v8a"
avdmanager create avd -n pixel9pro -k "system-images;android-37.0;google_apis;arm64-v8a" -d pixel_9_pro
emulator -avd pixel9pro

The demo server is http://10.0.2.2:3000 from the emulator.

The watch app is the wear module, beside the phone app, with the same application ID. So far it’s run only on an emulator. mobile/android/README.md has more detail on it, and on testing a Garmin watch through the phone.