Ankit Patel
WritingPapersLabsAboutContact
Distributed Systems & Data··2 min read·426 views

Which Door?

A phone's accuracy circle covers a bank, a cafe and a dry cleaner, where knowing it has stopped does not say which door

When a stationary phone sits outside a cafe, a bank and a dry cleaner, its horizontal uncertainty circle often covers all three storefronts.

A sharper coordinate helps. More frequent coordinates help confirm that the device has stopped moving. Neither one automatically tells you which door the person walked through.

Working with our Pilgrim SDK team at Foursquare reinforced for me that stop detection and venue attribution are separate problems in a mobile location SDK. Stop detection asks whether motion has turned into a stay. Venue attribution asks which physical place, if any, explains that stay. Waiting at a long red light can look like a stop without being a visit to any business on the corner.

That separation protects the battery budget. Before increasing location frequency, ask which uncertainty the extra measurements actually reduce. Polling GPS harder during a stay burns milliwatt-hours without resolving three adjacent doors that all sit inside the same indoor multipath shadow.

Platform rules enforce their own ceiling. Apple's energy guidance recommends bounding the accuracy and duration of location requests and relying on lower-power monitoring APIs until movement changes. Android 8's background limits throttle ordinary background location delivery to a few updates per hour regardless of how aggressively an app requests them.

A background SDK therefore has to design explicitly for each operating system's motion signals, Wi-Fi and cell transitions, permission tiers and process lifecycle states. 'Works while the app is closed' is not an engineering specification. Suspended, terminated, force-quit and 'When In Use' permission behave differently, and the product contract has to match what each state actually delivers.

Within those limits, low-cost motion and radio changes can gate when a higher-power fix is worth taking. Attribution then weighs geometry, storefront density, dwell duration and observed radio context. Some applications resolve that on the server where place polygons stay current, while others keep state on the device for latency or privacy reasons.

Confidence needs a consumer-specific threshold too. A consumer arrival prompt is immediately annoying when it welcomes someone to the wrong shop, so it demands high certainty. Offline foot-traffic analytics is often better served by retaining an unresolved stay or a probability distribution than by forcing a single confident venue ID.

Evaluate an SDK across the whole operating envelope: true visits captured, false visits triggered, detection delay, daily battery impact and behavior across every supported permission state. Improving recall by draining the battery or guessing at dense storefronts only shifts the defect.

Outside those three storefronts, 'the phone stopped on this block' is sometimes the strongest claim the sensors support. In my experience, good location infrastructure preserves that uncertainty instead of inventing a door.

Continue in Distributed Systems & Data