# Meditation Timer

Jhana meditation timer for GrapheneOS. Start/end gong, scroll-wheel duration
picker (presets 20/45/60/90), session history with depth rating + notes, and
sync to the meditation dashboard at health.rehbock.xyz/meditation.html.

## Pipeline

Push to `main` on [git.rehbock.xyz](https://git.rehbock.xyz/marcus/meditation-timer)
→ Gitea Actions builds a signed release APK → published as a Gitea release
→ Obtainium on the phone picks up the new version.

## Sync

Sessions POST to `https://meditation.rehbock.xyz/v1/sessions` (health-api).
The bearer token is **not** in this repo or the APK — set it once in-app
(History → Token) or seed it via:

```
adb shell am start -n com.marcus.meditationtimer/.MainActivity --es sync_token "<token>"
```

Sessions shorter than 30 seconds are not recorded (gong tests).

## Local build

```
./gradlew assembleDebug   # needs ANDROID_HOME or local.properties
```

Release signing (CI): secrets `KEYSTORE_B64` + `KEYSTORE_PASSWORD`; key alias
`meditation`. Keystore master copy: `~/.android-keys/` on the desktop.

## Gong

`app/src/main/res/raw/gong.wav` is synthesized (singing-bowl partials,
detuned fundamental pair for beating). Regenerate with the script in the
repo history / scratchpad if the tone needs tweaking.
