Delivered remotely for a business based in Paris, France. Names withheld by agreement.
Project Overview
Personal-safety software fails the moment it behaves like an ordinary social app. When someone feels threatened walking home at night, navigating an unfamiliar transit hub, or encountering a medical incident, they cannot afford multi-screen menus, dropped video frames, or silent background kills by the mobile operating system. Every interaction must trigger under stress, often one-handed or without looking at the screen.
This project engineered companion native consumer applications for Android in Java and iOS in Swift. Both apps enable users to maintain a verified circle of trusted contacts, start timed safety check-ins, and trigger instant distress broadcasts that stream live camera footage, microphone audio, and continuous GPS breadcrumbs while alerting contacts across push and fallback SMS channels.
Business Bottleneck
Earlier cross-platform prototypes struggled under real-world mobile conditions where reliability determines user trust:
- OS background termination: Aggressive battery savers on Android devices and strict background limits on iOS frequently killed location updates mid-journey.
- Unreliable alert handshakes on 3G/LTE edges: Naive HTTP calls failed silently in underground stations or crowded venues, leaving contacts unaware an SOS had been triggered.
- Audio-video capture contention: Competing camera sessions, Bluetooth headset routing, and screen-lock transitions caused black video frames or frozen streams during critical alerts.
Architectural Strategy
To guarantee deterministic hardware control, the engineering team committed to pure native development: Java with Android Jetpack/Foreground Services on Android, and Swift with AVFoundation and CoreLocation on iOS. Sharing a strict OpenAPI contract across both platforms kept payload schemas aligned while letting each client exploit platform-native lifecycle guarantees.
Networking relies on Retrofit (paired with OkHttp) on Android and Alamofire on iOS. Both layers enforce TLS certificate pinning, automatic token refresh, and structured retry policies. Rather than treating media capture and telemetry as a single monolithic request, the client separates alert signaling (lightweight, highest priority), GPS breadcrumb sync (SQLite-backed store-and-forward), and live WebRTC media streaming (adaptive bitrate under fluctuating bandwidth).
Core Capabilities
- One-Tap & Gesture SOS Activation: Immediate distress trigger from the home view, quick-action shortcuts, or configurable hardware-button sequences with accidental-tap countdown cancellation.
- Adaptive Live Audio-Video Streaming: Real-time front or rear camera streaming that steps down video resolution smoothly when cellular throughput drops, preserving audio clarity first.
- Trusted-Contact Circle Management: Contact verification workflows, tiered notification rules, and shareable live tracking links readable in any mobile browser without requiring app installation.
- Timed Check-In & Walk-Along Mode: Countdown timers for late-night commutes that automatically escalate to trusted contacts if the user does not confirm safe arrival before expiration.
- Dead-Zone Breadcrumb Buffering: Local SQLite persistence that queues location coordinates offline and replays the complete path once signal recovers.
Technical Architecture
Triggering an alert launches parallel signaling, telemetry, and media pipelines so trusted contacts receive actionable location data even before the first video keyframe negotiates.
Flow: User SOS Trigger -> Native Client (Java / Swift) -> Retrofit / Alamofire Alert API -> Push Gateway (FCM / APNs) + SMS Fallback -> WebRTC Media Ingest + SQLite-Buffered GPS Sync -> Trusted-Contact Live View.
Separating the control plane from the media plane ensures that even in severe congestion where video cannot sustain frames, trusted contacts still receive the user's distress notification and most recent coordinates within moments of activation.
Technology Stack
| Category | Technology Detail |
|---|---|
| Android Client | Java native application leveraging Foreground Services and Camera2 APIs |
| iOS Client | Swift native application using AVFoundation and CoreLocation frameworks |
| Android Networking | Retrofit with OkHttp interceptors, TLS pinning, and backoff retries |
| iOS Networking | Alamofire managing authenticated REST calls and multipart uploads |
| Live Media Transport | WebRTC adaptive-bitrate audio/video streaming from device sensors |
| Instant Alert Push | Firebase Cloud Messaging (FCM) and APNs high-priority wake notifications |
| Offline Buffering | SQLite local store queuing unsent GPS breadcrumbs during dead zones |
| Location Telemetry | Fused Location Provider (Android) and CoreLocation significant-change modes |
Engineering Trade-offs & Solutions
| Architectural Dilemma | Chosen Solution & Rationale |
|---|---|
| Cross-platform Flutter/RN vs. Native Java & Swift | Chose native codebases for direct access to Android Foreground Services, Camera2, iOS background audio/location modes, and predictable lock-screen capture behavior. |
| High-bitrate HD video vs. adaptive audio-first streams | Configured WebRTC bitrate ladders to sacrifice video frame rate and resolution before dropping audio, keeping spoken context intelligible on congested cellular towers. |
| Ephemeral memory queue vs. SQLite location buffer | Persisted unsent GPS points in encrypted SQLite tables so app restarts or network blackouts never erase a user's movement history during an incident. |
| App-only alerts vs. push + web link fallback | Combined FCM/APNs high-priority pushes with SMS web-viewer links so contacts on restricted networks or different platforms can still monitor the alert immediately. |
Security & Reliability
Personal-safety apps hold deeply sensitive location histories, contact graphs, and private video recordings. Both Retrofit and Alamofire clients enforce strict HTTPS with certificate pinning, store authentication tokens inside Android Keystore and iOS Keychain respectively, and clear sensitive temporary buffers once remote acknowledgment confirms receipt.
Because an aggressor might force a user to cancel an alert or seize their handset, cancellation requires an explicit user PIN or biometric check, and streamed video segments are locked server-side upon ingest so local app deletion cannot wipe cloud evidence. Silent-mode edge cases are addressed through high-priority push payloads and instant SMS alerts containing time-limited, cryptographically random viewing tokens.
Performance & Scale
Consumer safety clients must stay dormant with negligible battery drain during everyday standby yet wake hardware sensors instantaneously when triggered. Android utilizes WorkManager for periodic contact-sync housekeeping and activates a persistent Foreground Service only during active walk-along or SOS sessions. On iOS, CoreLocation runs in low-power significant-location mode until an active session shifts to best-for-navigation accuracy.
Media pipelines pre-warm camera and audio session configurations during SOS countdowns so streaming commences immediately if the user does not disarm the timer. Meanwhile, batched SQLite telemetry flushes compress coordinate payloads to preserve cellular data and battery during extended emergencies.
Operational Outcomes
Moving to dedicated Java and Swift native architectures eliminated the background-kill and camera-initialization defects that undermined earlier cross-platform builds. Trusted contacts receive alerts backed by resilient Retrofit and Alamofire retry mechanics alongside real-time WebRTC streams that degrade gracefully on poor networks rather than disconnecting outright. Subscribers gained dependable walk-along tracking and one-tap emergency broadcasting across diverse Android hardware tiers and iOS releases.