How the loop works · field notes

Behavior doesn’t change from a score. It changes from what you do with the score.

Every telematics program has detection and scoring. Most stop there. The score goes to a dashboard. The fleet manager looks at it when time allows. The driver never sees it. The behavior never changes. We built the part that comes after — and this page is exactly how it works, including where it breaks.

15,000km On Realme, Xiaomi & POCO
5OEMs Realme · Xiaomi · POCO · Pixel · iPhone
11months Field validation
7named failure modes Beta live
The four stages

What actually happens, trip by trip.

The loop has four stages. Each one depends on the one before it. If detection misses, the profile is incomplete. If the profile is incomplete, the coaching is wrong. If the coaching is wrong, the nudge arrives with no context. We’re going to walk through all four — including what we have today and what we’re building next.

Stage 1 · Live

Detection

Every trip, Sampark captures three signals without driver input or network connection. Phone use — identified by ML running on the device. Hard braking — flagged from 10 Hz IMU. Rapid acceleration — same IMU pipeline, scored alongside hard braking. At trip end, all three signals are packaged with GPS route data, encrypted on-device, and queued for upload.

Stage 2 · In development

Behavioral profile

A single hard brake is noise. A driver who hard-brakes in the top quartile for the fleet, uses their phone on 60% of trips, and accelerates aggressively after every stop — that is an actionable risk profile. We build it across trips, not just per trip. Per-trip scoring is live. Multi-trip behavioral profiling is in development with data from our first cohort.

Stage 3 · Building now

Coaching handoff

The coaching handoff is the most manual part of the loop — and deliberately so. The fleet manager or insurer knows their drivers. We give them the data. They run the intervention. The data layer is live. Scored trip data is available via API and dashboard. The structured coaching workflow — ranked reports, trend lines — is what we are building next.

Stage 4 · Live in beta

Driver nudges

After every trip, Bodha Drive shows the driver their own pattern — phone use this trip, where the hard brakes happened, how this week compares to last. Most of the time, a driver who sees their own pattern changes it. No phone call from a manager required. Live now with our first cohort of drivers.

We built all four stages because we’ve run programs where only one of them existed — and watched the others fail quietly.

The behavior change loop requires detection that does not miss. The first thing every telematics vendor will show you is a graph. Detection accuracy 97%, battery impact under 2%, trip pickup within 30 seconds. The graph is real. What the graph hides is the device it was measured on.

The Indian, Southeast Asian, and Latin American driver markets — the ones where UBI and BBI policies actually grow — do not run on Pixels. They run on Realme, Xiaomi, POCO, Vivo, OPPO, Tecno, Infinix. These OEMs ship aggressive process killers, custom doze policies, and app-lock layers stacked on top of stock Android. Telematics SDKs that work in the test lab quietly fail in production because the OS keeps killing them.

A telematics SDK that stops detecting trips after 10 minutes of force-kill is not a telematics SDK.

We know this because we ran telematics programs as the operator before we built a vendor. The 11 pm fleet-client call about missing trips was about a Realme GT2 Master. The dropped UBI cohort in the Karnataka pilot was on Redmi Notes. The SDK worked in the demo. It didn’t work in the country.

So when we built Sampark, the test plan was inverted. Don’t prove it works on the easy phones — prove it works on the phones that quietly break everything else. Then prove it again on the easy phones, just to confirm we hadn’t over-fit. 15,000 km on Realme, Xiaomi, and POCO. The kill clock below is what we measured. The fixes are what we shipped.

Background-app kill clock

Time to first kill on cold boot
Realme
8min
Xiaomi (MIUI)
12min
POCO
14min
Vivo (FuntouchOS)
22min
Pixel (stock)
indefinite
iPhone (iOS 17+)
indefinite

Measured Q1 2026 on factory-reset devices, default battery saver, no whitelisting. A “working” telematics SDK on the top four lines of this table needs to recover from being killed — not avoid it.

Below: how the 15,000 km broke down, the seven failure modes we encountered, and the calibration loop we run before any program goes live.

The 15,000 km
15,000km
Logged · validated · fed back into the loop

Bengaluru-to-Mysuru highway runs. Local Koramangala stop-and-go. Two-wheeler commutes through monsoon. Cold-boot detection tests at 6 am after 8 hours of force-kill. Every kilometre on a phone that real customers actually use.

5,200km Realme
4,800km Xiaomi · Redmi
3,600km POCO
800km Pixel (reference)
600km iPhone (reference)
Failure mode catalog

Seven ways a telematics SDK breaks.
Seven things we ship to fix them.

Every entry below is a bug we hit in 15,000 km of testing. Vendors that pretend these don’t exist haven’t shipped at scale. We name them because the customer is going to hit them in the first month either way.

Each failure mode below is a way the loop breaks. Each fix is how we close it.

01

Realme Game Space kills the SDK at 8 minutes idle.

Trips end mid-drive. App force-stopped by Phone Manager. No event, no log line. The SDK simply stops existing.

Fix shipped

Persistent foreground service with a low-importance notification, plus geofence and AR transition wake-ups. SDK recovers within 90 seconds of new motion even after a hard kill.

SamparkAndroid::ForegroundService · tested on RMX3370 / RMX3636

02

MIUI auto-start permission is off by default.

Driver installs app, grants location, never grants auto-start. SDK never restarts after device reboot. Cohort silently drops out at week one.

Fix shipped

Install flow detects MIUI build and walks the user through three OEM-specific toggles: Auto-start, Battery saver lockout, Background activity. Detection of grant state is verified before the SDK reports “ready.”

SamparkAndroid::OemPermissionFlow · tested on Mi 11i / Redmi Note 11 / 13

03

iOS pause-and-resume stretches GPS callbacks to 3-7 minutes.

During a long highway drive, GPS callbacks suddenly batch every 3-7 minutes instead of 1 Hz. Trip route looks like a polygon. Distance and speed estimates corrupt.

Fix shipped

Root cause is calling stopUpdatingLocation() while backgrounded — it destroys the iOS “foreground-established” assertion. We never stop the stream in background; accuracy and distance filter mutate on the live manager. Confirmed by 10-hour drive logs from Feb 2026.

SamparkiOS::CLLocationManager + research/ios-background-location-research-report.md

04

Force-kill (user swipes app away) → SDK gone for the rest of the day.

User swipes the app off the recents tray. Most SDKs interpret this as a permanent “don’t run me” signal. No more trips that day — a 60% loss in trip volume in the first week of every program we ran.

Fix shipped

Layered recovery: significant-location-change (iOS), geofence-exit + activity-recognition transitions (Android). SDK re-arms within 30-90 seconds of the next motion event. Validated across 15,000 km.

SamparkCore::WakeOrchestrator · tested on all 5 OEMs

05

Airplane mode for two weeks → checkpoint corruption.

User flies internationally, comes back to find their last 14 days of trips partially missing. SQLite WAL never flushed. Some trips uploaded as partial records.

Fix shipped

SQLite WAL checkpoint on every trip end. Idempotent upload with signed presigned URLs — backend dedupes by trip ID. We honestly admit: at 14+ days of buffered data, aggressive devices may still lose tail trips. We surface a user-visible heartbeat at day 7.

SamparkCore::Storage + cloud_sync.rs

06

Cross-language bridge deadlocks the SDK silently.

The SDK’s Rust core and the iOS/Android layer communicate via a typed bridge. Under certain callback patterns, the bridge deadlocks — the SDK hangs with no log line and no crash. Trips stop uploading. Confirmed via Perfetto profiler traces (Mar 2026).

Fix shipped

Root cause identified and an architectural rule now enforced across every callsite: cross-language callbacks must never re-enter the calling side synchronously. Every call in the chain is documented. No silent hangs since the fix shipped in March 2026.

SamparkCore::cloud_sync · rule documented across all callsites

07

Repeating animations at idle pin render at 60-120Hz, drain battery.

Caught during CPU regression in our own driver app: 167-195% CPU at idle on iOS, 28% on Android. Two repeating animations + an observable that re-rendered the entire dashboard.

Fix shipped

Rule across all our software: zero repeating animations at idle. Live trip indicator pulse is the only allowed loop. Both platforms now show 0% idle CPU. We share this rule with integrators because it’s easy to violate accidentally.

CPU regression fix Apr 26-27 2026 · iOS & Android

Before any program goes live

Tested by us. Recalibrated against you.

Our 15,000 km is the floor, not the ceiling. Every program runs through a four-stage calibration loop against your fleet, your geography, your driver mix — before a single policy goes live.

Day 0 · pre-pilot

Device matrix audit.

Your top 6 device families, ranked by share. We confirm coverage and flag any OEM we haven’t certified yet.

Week 1 · pilot

Live calibration sweep.

100-200 drivers, 7 days. We pull anonymised raw IMU and trip metadata. Detection thresholds and scoring weights re-tuned against actual behaviour.

Week 4 · widen

Failure-mode review.

We review every dropped trip, every battery complaint, every false-positive event. Fixes ship the same week. Calibration sign-off before policy go-live.

Quarterly · live

Drift checks.

Device share shifts. New OEM updates ship. Driver mix changes. We re-tune at quarterly cadence and notify you of any envelope changes.

Bring us your device matrix

Ready to run the loop on your fleet?

First conversation is 30 minutes with the engineer who’d own your integration. Bring your device list, your geography, and your timeline. We’ll tell you what the first 90 days look like for your specific program — and we’ll be honest about what isn’t ready yet.

Book the call

If we’re not the right fit, we’ll tell you who is. No follow-up sequence.