Files
foto-duplicate-finder-free/docs
SoftwareApp 6d031082a3 fix: keep the scan's foreground service inside Android's start budget
ScanController called stopService() from a Dispatchers.Default coroutine right
after startForegroundService(), so a scan that finished at once or a Cancel tap
could beat the pending foreground start on the main thread. ScanService then
never reached startForeground() and Android killed the process a few seconds
later with
RemoteServiceException$ForegroundServiceDidNotStartInTimeException - a stack
with no app frames.

- ScanService enters the foreground in onCreate() and at the top of every
  onStartCommand(), before the Cancel early-return.
- A refused startForeground() (start not allowed, missing service type or
  permission, rejected notification) is logged instead of crashing, and a
  notification error can no longer kill the state collector.
- The service stops itself when it observes scanning == false; nothing outside
  it calls stopService() any more.
- New Robolectric ScanServiceTest covers onCreate, the idle and cancel paths, a
  failing startForeground() and the Android 15 onTimeout path.
- Version 1.1.2 / versionCode 7: versionCode 6 (1.1.1) is already on a Play
  track. CHANGELOG, AGENTS.md, codemap, ROADMAP and the release checklist
  (1.1.2 artefact record and paste-ready notes) are updated.
2026-11-09 00:25:56 +01:00
..