Native Android (Kotlin + Compose) app that replaces MacroDroid for the dexPendulum pushpush phone pipeline.
- Pair — scan the "Relay app pairing" QR in DexArb → Trading Accounts → Communication → Phone payment monitoring (click Reveal header secrets first so the QR contains the shared secret).
- Relay payments — a
NotificationListenerServiceforwards notifications from allowlisted banking apps toPOST {notify_url}with body{"app","title","text"}and headerX-Webhook-Secret. - Heartbeat — a foreground service POSTs
{"device_id":"payment-phone-<8hex>"}every 5 minutes to{heartbeat_url}with the same header, keeping the dashboard's Phone online state green.
- Grab the latest signed APK from GitHub Releases
(or
adb install app/build/outputs/apk/debug/app-debug.apkfor dev builds). - Open the APK on the phone (allow Install unknown apps when prompted), grant camera permission, scan the pairing QR.
- Grant notification access when prompted (Android settings).
- Disable battery optimization for the app (checklist in-app).
- Done. Services restart automatically after reboot.
Note: cleartext HTTP is currently only allowed to the emulator host
(10.0.2.2). Pairing from a real phone over LAN requires either HTTPS on the
relay endpoints or extending networkSecurityConfig.
Releases are fully automated: pushing a tag v* triggers
.github/workflows/release.yml, which runs the tests, builds a signed release
APK and attaches it to a GitHub Release.
Signing material lives in a local plaintext .env (gitignored) holding the
keystore base64, passwords, and alias. After any commit that changes .env, a
lefthook post-commit hook encrypts it into the committed .env.enc via
dotenvx and creates an automatic .env values update
commit. The decryption private key stays in the gitignored .env.keys and is
uploaded once as the GitHub secret DOTENV_PRIVATE_KEY_PRODUCTION; CI uses it
to reconstruct .env from .env.enc.
Local signed release build:
export PATH="$HOME/.local/bin:$PATH"
dotenvx run -- bash -c '. .tools/env.sh && ./gradlew assembleRelease'The keystore pushpushrelay-release.keystore is generated once via
./scripts/generate-keystore.sh and never leaves your machine (gitignored).
Back up .env, .env.keys, and the keystore privately — losing them forces an
uninstall/reinstall of the app, which wipes the stored pairing secret and
device id.
See AGENTS.md for architecture and the multi-agent loop. Toolchain lives in
.tools/ (run . .tools/setup.sh once, then . .tools/env.sh). Gate:
. .tools/env.sh && ./gradlew build lint test
The pairing QR payload contract: {"v":1,"type":"pushpush-pairing", "notify_url":...,"heartbeat_url":...,"secret":...} — produced by
dexMonitor's PhonePushSetupSection.tsx, parsed by
pairing/PairingPayload.kt.