Parked Car Finder via Mobile App
User parks at a shopping mall, leaves for an hour — doesn't remember where the car is. Solved by saving GPS coordinates when parking. But naive implementation gives 10–20 meter error inside parking or dense urban sprawl — user still wanders.
How to correctly detect parking moment
Most reliable trigger — disconnection from car's Bluetooth. When user turns off engine and leaves, phone loses Bluetooth connection (CarPlay, Android Auto, or just audio system). This is a clear signal: "car parked here."
On iOS: CoreBluetooth + CBCentralManagerDelegate.centralManager(_:didDisconnectPeripheral:error:). On disconnect — save last known coordinate from CLLocationManager. Problem: detected for specific CBPeripheral.identifier, needs linking to user's vehicle beforehand.
On Android: BluetoothAdapter.ACTION_ACL_DISCONNECTED broadcast + filter by device name/address. Works in background via BroadcastReceiver.
Alternative — activity-based algorithm: Google Activity Recognition API (DetectedActivity) detects when user switches from IN_VEHICLE to ON_FOOT. At this moment — save coordinate. No Bluetooth needed, but triggers with ~30–60 second delay.
On iOS equivalent: CMMotionActivityManager — detects activity mode change via accelerometer/barometer.
Saving and displaying marker
Coordinate saved locally — UserDefaults/SharedPreferences for simple case, or Core Data/Room if history needed. Map marker — custom MKAnnotationView / Marker with car icon.
GPS accuracy in city worsens from reflections (urban canyon effect). Average 3–5 last points before saving instead of one — reduces random outliers. CLLocation.horizontalAccuracy > 50 meters — don't save, wait for better accuracy.
Inside multi-level parking GPS often doesn't work at all. Fix last point before underground entry (when GPS worked) + manually entered floor/level.
Navigation to car
Direction and distance to saved point — compass with CLHeading (iOS) or SensorManager.SENSOR_DELAY_UI + TYPE_ROTATION_VECTOR (Android). Arrow rotates as user moves.
For "open in maps" — deep link to Google Maps / Apple Maps with parking coordinates as destination. Pedestrian route built in native maps app, not ours.
AR search mode — overlay arrow via camera with distance. ARKit (iOS) or ARCore (Android). Looks impressive, practically useful in complex parking. Adds 3–4 days development on top of basics.
Parking history and notes
If history needed ("where do I usually park at this office") — Core Data / Room with parked_locations table: coordinate, address (reverse geocoding via CLGeocoder / Geocoder), timestamp, optional user note ("3rd floor, section B").
List of recent spots — TableView / RecyclerView with cells: address, date, map thumbnail via MKMapSnapshotter (iOS) or static Google Maps Static API (Android). Tap record — opens route to that place. Useful for recurring trips.
Storage limit — last 20–50 places, older auto-delete. Cloud sync (iCloud via NSUbiquitousKeyValueStore or Firebase Firestore) — if user changes devices.
Timeline
Basic implementation (save on Bluetooth event + display on map + compass): 4–8 hours. With AR mode, parking history, and smart Activity Recognition: 1–2 working days. Cost calculated individually.







