GeoLock & GeoCampus: Patented Geofencing & Low-Power Background Telemetry
How I engineered a low-power mobile geolocation engine with React Native native bridges and MongoDB 2dsphere indexing that operates continuously under a 5% daily battery budget.
Project Context & My Responsibility
GeoLock Technologies developed parental safety and school-district distraction management software. As the Principal Mobile & Cloud Solutions Architect, I held complete ownership over the end-to-end technical implementation: mobile native bridge architecture, background location daemon resilience, cloud geospatial query pipelines, and device management integration.
The Engineering Problem & Hard Constraints
The system faced two crippling engineering hurdles that had caused earlier attempts to fail:
- Severe Battery Drain: Standard continuous GPS chip polling drains 100% of a mobile smartphone battery in 3 to 4.5 hours. Students routinely killed the app before lunch to keep their phones alive.
- Aggressive OS Background Process Termination: Both Apple iOS and modern Android distributions (Android 10+) aggressively terminate background background tasks and throttle unmanaged location daemons after 15 to 30 minutes of screen-off time.
- Tamper Circumvention: Students frequently turned off cellular data, toggled airplane mode, or revoked permissions to bypass classroom lockdown rules.
Architectural Strategy & Technical Decisions
Instead of keeping high-precision GPS constantly awake, I engineered a 3-tier tiered-sensing state machine:
Why MongoDB 2dsphere Polygonal Indexing?
Rectangular bounding boxes were insufficient for irregular campus boundaries, school bus routes, and sports fields. By storing geofences as GeoJSON Polygon and MultiPolygon geometries with a 2dsphere index, spatial queries using $geoIntersects executed in under 4 milliseconds even across thousands of simultaneous child telemetry pings.
Difficult Engineering Problems Overcome
1. Surviving Android Doze Mode & iOS Background Execution Limits
Constructed custom native foreground service bridges in Kotlin utilizing NotificationManagerCompat with ongoing persistent status icons, paired with CLLocationManager.allowsBackgroundLocationUpdates = true on iOS with deferred location updates.
2. Cryptographic Tamper-Detection & Heartbeat Dead-Mans-Switch
If a user killed location permissions or enabled airplane mode, an automated dead-man's switch on the cloud server flagged the missing 90-second heartbeat and dispatched a tamper notification alert to the parent dashboard via Firebase Cloud Messaging.
3. Zero-PII Spatial Privacy Engineering
Complied with strict student privacy guidelines (FERPA & COPPA) by hashing student identities on device transit and storing coordinates solely as ephemeral rolling geospatial buffers rather than permanent unencrypted breadcrumb databases.
Measurable Results & Technical Outcome
- United States Patent Issued: The multi-tiered geofencing and distraction-free mobile architecture was recognized and awarded a formal patent by the USPTO.
- Sub-5% Daily Battery Budget: Telemetry measurements confirmed the application operated continuously throughout an 8-hour school day consuming less than 4.8% total phone battery.
- Under 800ms Polygon Trigger: School zone boundary entry triggered lockdown mode within 800 milliseconds of threshold intersection.
Building a complex mobile, IoT, or geospatial platform?
I consult on mobile architecture, battery optimization, and low-latency geospatial backends.