A 140dp draggable bubble shows the same map / tier scrim / user dot /
ALPR dots that the in-app circle does, on top of any other app, while
scanning is on. Tap = brings the host app forward; drag = repositions.
- Manifest: add SYSTEM_ALERT_WINDOW (special-access — granted via
system Settings page, not the runtime prompt).
- Settings: add overlayEnabled flag (default off) + a "Display over
other apps" section in SettingsScreen. Flipping the toggle to on
fires Settings.ACTION_MANAGE_OVERLAY_PERMISSION so the user can
grant via the system page; if they deny or revoke, the OverlayMgr
re-checks canDrawOverlays() at every show() call and silently
no-ops, no crash.
- New OverlayManager: owns the WindowManager view at
TYPE_APPLICATION_OVERLAY with FLAG_NOT_FOCUSABLE | FLAG_NOT_TOUCH_MODAL
so touches outside the bubble pass through and the bubble never
steals IME focus. Custom OverlayOwner implementing LifecycleOwner +
SavedStateRegistryOwner since LifecycleService doesn't satisfy SSR
(Compose's ComposeView requires both via the view tree).
- Drag/tap handler at the View layer: rawX/rawY math for the drag,
TAP_SLOP_PX guard to discriminate tap from drag, tap launches
MainActivity (FLAG_ACTIVITY_NEW_TASK | SINGLE_TOP).
- New OverlayBubble composable: smaller (140dp) self-contained version
of the in-app threat circle that pulls running/threat/location/
mapPoints/proximity from the same companion StateFlows. Shared
dot-drawable helper extracted into ui/MarkerIcons.kt.
- DetectionService observes settings.overlayEnabled in beginScanning
and toggles the overlay; endScanning hides it.