Mobile Technical Architecture
This page explains how the Crisis Connect Android app establishes trust, moves messages offline, promotes responders into secure paths, and keeps cloud services out of emergency content relay.
System Summary
Operating Model
Design Principles
Local Before Cloud
Emergency payloads stay on device-to-device radio paths. Cloud services, when present, support trust and telemetry rather than message relay.
Direct Before Mesh
Default behavior is point-to-point Bluetooth. Higher-reach modes are layered on only under explicit role, capability, and operator controls.
Bounded Runtime
The design assumes constrained power and unstable field conditions, so queue caps, retry bounds, foreground services, and single-call voice scope are intentional.
Trust Is Explicit
Contacts become operational only after QR bootstrap plus cryptographic liveness, and responder-secure flows require certificate-backed verification.
Primary Radio Stack
Controlled Extensions
Authorized Responder Mesh
Opt-in Public GATT Channel
Explicit Activation Gates
Bounded Abuse Controls
Trust Bootstrap
Identity and Trust Model
Known-Contact Secure Path
Responder Authentication
Mesh Eligibility
Key and Certificate Lifecycle
Message Lifecycle
Voice Path
Voice Profile
Call Sequence
Adaptive Policy
The implementation downgrades from WB to NB when write times rise, underruns recur, or jitter depth becomes unstable; it upgrades again only after sustained recovery. This is a bounded continuity policy, not a universal QoS guarantee.
Rescue Mode
SOS Beaconing
- User-triggered SOS places the device into a local distress state and emits connectable BLE advertisements for Rescue service `0xCC00`.
- Advertisement content stays minimal in the baseline: the radio signal exposes service-level discoverability rather than a full authenticated identity.
- SOS broadcast is designed to improve nearby responder discovery during sector sweeps when wide-area networks are down.
- The privacy cost is explicit: discoverability increases in SOS mode, so consent, clear UI state, and rate controls matter.
Responder Verification
- After connection, responder and victim exchange auth challenge and response on `0xCC10` and `0xCC11` and derive an ephemeral ECDH session key.
- Encrypted role proof arrives on `0xCC20` and must include certificate reference, role scope, issuance time, and expiry.
- Validation checks signature, trust anchor, transcript binding, expiry, and role authorization before any secure promotion is allowed.
- Expired, malformed, or wrong-scope proofs are rejected at the gate rather than downgraded into rescue chat.
Secure Rescue Chat
- Only after successful verification does the victim emit `OK` on `0xCC21`, opening the secure path.
- Encrypted two-way rescue chat then proceeds on `0xCC30` and `0xCC31` with `DELIVERED` and `READ` ACK semantics.
- Current baseline constraints include bounded role-proof packet size, MTU-aware chunking, and a large but finite secure-chat packet envelope.
- Unverified clients never reach the secure write channel; the promotion gate is a hard boundary, not advisory UI.
Background Services
RfcommForegroundService
Maintains the classic transport listener, call signaling, and media or file transfer lifecycles for direct nearby sessions.
GattSOSServerService
Hosts the Rescue Mode SOS broadcaster and the secure responder interaction endpoint used by victims in BLE rescue flows.
GattRescueClientService + MeshAwareService
Handles responder-side BLE rescue sessions and, when authorized, Wi-Fi Aware mesh discovery and authentication with bounded reconnect behavior.
CrisisLink, Offline Tools, and iOS Note
CrisisLinkForegroundService flushes queued telemetry after validated internet recovery, OfflineDownloadService manages offline map regions, and the separate iOS client remains real but still behind its own readiness gates.