Mobile app
The Excubio app for iOS and Android is the responder's pager. It receives
pages as push notifications that sound through "do not disturb",
acknowledges them with one tap, and shows incidents, shifts and swaps. It
is a client of the cloud API like the cloud UI (ui.md): every
action in the app is an /api/v1 call that the UI and excubioctl can make
as well. Push is one medium of the media chain
(on-call.md §4); SMS and voice are the media that
don't depend on Apple, Google or the phone's data connection. Tables:
schema/cloud.sql §1 and §5; endpoints:
api/cloud.yaml (tag devices).
1. Platforms and distribution
| iOS | Android | |
|---|---|---|
| Minimum version | iOS 17 | Android 12 (API 31): key agreement with a keystore key needs it |
| Push service | APNs, token authentication | FCM HTTP v1 |
| Pages through "do not disturb" | Critical alerts | A notification channel that bypasses "do not disturb", with the person's permission, and the alarm audio stream |
| Distribution | App Store; Apple Business Manager | Google Play; managed Google Play |
- One app for all tenants, published by the vendor. MDM can set two values
by managed app configuration: the tenant host (
acme.excubio.example) and a login hint. Without them, the person types the tenant host or scans the QR code on the cloud UI's Me page. - German and English, from the person's
language; screen readers, font scaling and dark mode as in the UIs (ui.md §1). - The cloud accepts app versions released in the last 12 months. An older app is told to update and receives no pages; its person is warned by e-mail.
2. Sign-in and devices
- The person logs in through the tenant's IdP in the system browser (OIDC with PKCE through Zitadel, architecture.md §12). Team membership syncs at this login as at any other.
- The app creates a P-256 key pair in the platform keystore (Secure Enclave, StrongBox or TEE); the private key can't be exported. The app keeps the public key, which opening a push needs.
- With the login session, the app registers the device: name,
platform, app version, push token and public key. The cloud returns a
device token (
exd_…) once; the app keeps it in the keychain or keystore, excluded from backups and device transfers.
- A person has at most 5 devices. A device belongs to one person and acts
only as that person, with the rights of
member(architecture.md §10); the device token can't create API tokens, change roles or read audit data. - Login validity. A device token is valid for 30 days after the last
IdP login on the device; the app renews it with the new login
(
api/cloud.yamlrenewDeviceLogin). The person's roles are read with every request, so a removal by an admin applies at once; a removal from an IdP group reaches the device with its next login (on-call.md §1). From 7 days before expiry, the app asks for a login, and the cloud reminds the person by push and e-mail when the device would expire during one of their shifts. An expired device gets no pushes; its steps fail at once (§3). - Revocation. The person (in the app or on the Me page), a tenant admin, or the cloud when the person becomes inactive (compliance.md §5) revokes a device. At its next contact, a revoked device deletes the account's local data and keys.
- Several tenants. The app holds one account per tenant, for people on call for more than one customer. Each account has its own device token, key and local store; a push names its account.
3. Push delivery
A media step push (on-call.md §4) notifies each
of the person's devices; each device gets its own delivery row. The step
is one unit: it succeeds with the first device receipt, and its wait
runs from that receipt; it fails when every device has failed or given no
receipt.
| Field of the step | Values |
|---|---|
level | critical (default): sounds through "do not disturb" and the silent switch, at the device's page volume. standard: a time-sensitive notification that respects "do not disturb". |
wait | As for any step; it runs from the first device receipt. |
- Content. The cloud encrypts the notification to the device's public
key with HPKE (RFC 9180) in base mode: DHKEM(P-256, HKDF-SHA256),
HKDF-SHA256, AES-128-GCM,
infoexcubio-push-v1, the delivery ID (of a notice, the notice's ID) in its text form as AAD and one message per context. The plaintext is JSON: the incident ID, short code, title (at most 200 Unicode code points), severity, team and rotation, alert count and level, the fields the SMS also carries (on-call.md §4); an ActionRule'spayload = "minimal"applies in the same way. At 200 code points the push uses at most 2.5 KB of the 4 KB that APNs and FCM allow (mobile-push spike). - What the push services see. APNs and FCM see the push token, the
account ID, the delivery ID, the 65-byte encapsulated key (
enc), the ciphertext and a generic visible text ("Excubio: new page"). Collapse, thread and tag IDs are random per incident and device, never the incident ID. On iOS a notification service extension decrypts the content and replaces the text; on Android the app receives a high-priority data message and builds the notification. The device's key agreement runs in the keystore and the app's Rust core does the rest (stack.md §4). - Failed decryption. The generic text is shown. The receipt is posted all the same, and its answer names the incident, so opening the notification loads it.
- Receipts. APNs or FCM accepting a push is status
sent. When the app or its extension receives the push, it posts a receipt: statusdelivered. Without a receipt within the receipt window the step gets statusno-receiptand the chain moves on at once, as after a failed SMS; a late receipt is recorded but doesn't change the chain. The window is a setting of the installation, 30 s by default (operations.md §3): the receipt latency on real devices is a claim of themobile-pushspike that is open (spikes). With the default,push → 1 min → smssends the SMS 30 s after an unanswered push to a phone that is off, and 1 min after the receipt otherwise. - Failures. A push token that APNs or FCM reports as unregistered marks
the device
unreachable; it is not retried until the app registers a new token. An expired, revoked or not-ready device (§4) fails its delivery at once with the reason recorded. - Push health. APNs and FCM are watched with the carriers' health rule (on-call.md §4), by what the service answers when the cloud submits a push. Device receipts don't count: a phone that is off or asleep says nothing about the service, and the receipt rates are reported, not judged (operations.md §9). While a push service is unhealthy, push steps on that platform fail at once, and the change is recorded.
- Updates. When an incident is acknowledged, declined, escalated past a person, reassigned or resolved, every device that was notified for it gets a silent update: its notification is replaced ("acknowledged by …") and the page sound stops. Updates are best effort and are not deliveries but notices (on-call.md §4).
- One notification per incident. Notifications carry the incident's random thread or tag; a later message for the same incident ("+3 alerts") replaces the earlier one. Throttling is that of every medium (on-call.md §4).
- Sound. On Android the page sound plays on the alarm stream and repeats until the person acts or 60 s have passed; on iOS a critical alert plays its sound once, for at most 30 s. The person chooses the sound and the page volume per device.
- Information notifications (shift reminders, swap requests, expiring logins, stakeholder updates, messages to involved rotations, punch-out reminders) use a separate quiet channel and are never critical. They are notices too.
4. Readiness
The app checks on every start and resume, and whenever it receives a push, what a page needs, and reports the result to the cloud:
| Check | iOS | Android |
|---|---|---|
| Notifications allowed | yes | yes |
| Critical alerts allowed | yes | – |
| Page channel bypasses "do not disturb" | – | yes |
| Exempt from battery optimisation; background use not restricted | – | yes |
| Push token current | yes | yes |
| App version accepted | yes | yes |
- A device is ready when all checks of its platform pass. Notifications not allowed, an old app or a missing push token make it not ready, and its push steps fail at once. A device that can't sound through "do not disturb" or is battery-optimised is limited: it is notified, and the app, the Me page and the rotation managers' Rotation page show the missing permission.
- A device that hasn't reported for 7 days is stale; shift reminders name it (on-call.md §10).
- Test page. From the app or the Me page, a person sends themselves a critical test push to one device. It rings like a page and is dismissed on the device; it is a notice, not an incident, and its result is the device's receipt, which the Me page shows. Number tests (on-call.md §8) test push as well.
5. Responding
- From the notification: acknowledge and decline, also on the lock screen. These two actions have the power of an SMS reply; any other action opens the app, which requires the phone to be unlocked.
- In the app: every response of on-call.md §5
(ack, snooze, unack, decline, escalate, reassign, invite, join, merge,
resolve, note), with channel
app. - Offline. An action taken without connectivity is queued with its
Idempotency-Keyand sent when the phone is online again. The app shows it as pending until the cloud confirms it; the chain and the escalation go on meanwhile. The cloud applies it at the time it arrives, with the outcome of on-call.md §5 for the incident as it is then, and records the device time with it. - Links. The signed incident link in an SMS opens the app when it is installed and the web incident page otherwise.
6. Screens
| Screen | Shows | Actions |
|---|---|---|
| Incidents | Open incidents of the person's rotations, those delivered to the person first, unanswered marker | Ack, decline |
| Incident | As the cloud UI's incident page (ui.md §3): for a group, the probable cause, members and linked incidents; the deliveries to the person | All responses including join and merge |
| On call | Who is on call now and next for the rotations of the person's teams | Manual page (on-call.md §9) |
| My shifts | Upcoming shifts, swaps offered to the person, absences, punch-in state | Request swap, accept swap, override myself, record an absence, punch in or out |
| Me | Devices with readiness, notification rules, sound and page volume, shift reminder | Edit, test page, revoke a device, add the sender numbers' contact card |
Rotations, teams, hubs, Watch and reports are managed in the cloud UI only. While the app is in the foreground it follows the incidents with server-sent events; in the background it relies on push and reloads on resume.
7. Data on the device
- The app caches the incidents of the last 7 days that the person can see, the person's shifts 30 days ahead and the rotations of their teams, in a store encrypted with a keystore key and available after the first unlock, so the notification extension can read it while the phone is locked. It holds no alert data beyond the page payload.
- Logout and revocation delete the account's cache, device token and keys.
- The app contains no advertising, analytics or third-party tracking code. Crash reports go to the vendor in the EU without incident content, and only if the person allows them.
- Permissions: notifications, critical alerts (iOS), "do not disturb" access and the battery optimisation exemption (Android); the camera only for the QR code, contacts only to add the sender numbers' card. Each is asked for when the person uses the feature that needs it.
8. Independence
- A media chain that contains
pushends with SMS or voice (on-call.md §4), so a page reaches the person when Apple, Google or the phone's data connection fail. - Watch pages by SMS and voice through its own carrier, never by push (watch.md §2); the hub's local fallback channel sends SMS only (architecture.md §7).