All Case Studies United States Patent Awarded

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.

US Patent
Proprietary Technology
< 5%
Daily Battery Consumption
< 800ms
Geofence State Switch
K-12
Campus Adoption

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.

React Native Swift / Objective-C Bridge Kotlin / Java Bridge Node.js MongoDB Geospatial (2dsphere) WebSockets / MQTT AWS IoT

The Engineering Problem & Hard Constraints

The system faced two crippling engineering hurdles that had caused earlier attempts to fail:

  1. 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.
  2. 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.
  3. 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:

State 1: SLEEP / LOW-POWER MOTION MONITOR ├── CoreMotion / Android Significant Motion Detector (ActivityRecognitionClient) └── Power Draw: <0.2 mA │ ▼ (Significant Motion Detected > 15 meters) State 2: CELL TOWER & WI-FI SSID TRIANGULATION ├── Checks Wi-Fi BSSID proximity and cell tower ID ├── Compares against localized cached boundary polygons └── Power Draw: <1.5 mA │ ▼ (Device approaches within 100m of Geofence Boundary) State 3: HIGH-ACCURACY GPS BURST ├── High-precision GPS fires for 3 seconds to confirm polygon intersection ├── Dispatches WebSocket packet to Node.js Geospatial Processor └── Switches OS app lockdown profile immediately

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

Building a complex mobile, IoT, or geospatial platform?

I consult on mobile architecture, battery optimization, and low-latency geospatial backends.

Discuss Your Project Explore Other Case Studies
Discuss Your Project