# Project Prompt — oncall-mobile-android

## What this is

Centralcloud OnCall Android pager. Forked from `binwiederhier/ntfy-android`;
fully renamed to `com.centralcloud.oncall` (no `io.heckel.ntfy` left in
the source tree).

Engineer's single pane for on-call: paging, conference bridge, agent
chat, plus an SMS-relay subsystem that forwards whitelisted incoming
SMS from this device's number to centralcloud-ops.

For the long form see [`AGENTS.md`](../../AGENTS.md). For test setup
see [`TESTING.md`](../../TESTING.md). For the build shell see
[`flake.nix`](../../flake.nix).

## Non-negotiables

- **Package namespace is `com.centralcloud.oncall`.** Don't reintroduce
  `io.heckel.ntfy` in any file — the rename is complete and absolute.
- **Centrally configured.** App hits
  `GET https://ops.centralcloud.com/api/android/config` on first
  launch — everything else (server URLs, default topics, FCM project)
  comes from there. Hardcode at most one URL.
- **Strict opt-in for SMS relay.** `SmsRelayPreferences.enabled`
  defaults false. Whitelist is required (empty set → forward nothing).
  Disclosure must be clear in the settings UI — the app reads
  incoming SMS, and that's sensitive.
- **Greenfield, no backwards compat with upstream ntfy.** Backup
  format magic was rewritten (`oncall26`), URL scheme is `oncall://`,
  intent action namespaces are `com.centralcloud.oncall.*` (e.g.
  `com.centralcloud.oncall.SEND_MESSAGE`).

## Workflow

- Build via Nix dev shell: `nix develop` then `./gradlew assembleDebug`.
- Tests: see TESTING.md.
- Install on ops phones: `adb install -r app/build/outputs/apk/...`.
- SMS-relay config: launch
  `adb shell am start -n com.centralcloud.oncall/.sms.SmsRelaySettingsActivity`,
  set base URL + device ID + whitelist + toggle on.

## Sibling repos

- **`centralcloud/infra`** — the centralcloud-ops Phoenix app this
  connects to (`/api/push/*`, `/api/sms/inbound/phone-relay`,
  `/api/devices/heartbeat`, etc.).
- **`centralcloud/operations-memory`** — Go memory service.
- **`singularity/singularity-forge`** — SF planning tool.
