You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android: AudioRecordingService stays in foreground after recording stops #474
After stopRecording() completes normally on Android, AudioRecordingService remains isForeground=true with its ongoing notification. The phone keeps showing a recording notification even though no recording is in progress.
JS reports isRecording: false at the same moment, so the two sides disagree: the JS session ended but the Android foreground service did not.
Expected
The service leaves the foreground and removes its notification once recording stops, so no ongoing recording notification remains.
Notes
Found while validating the benchmark script's teardown. Reproduces on a normal completed run, not only on interrupted ones, so it is independent of how the recording ends. Impact is a stale user-visible notification plus a foreground service held longer than needed.
Suspect the stop path does not call stopForeground/stopSelf on every branch. Not yet traced to a specific line.
Additional evidence: the stale notification is not backed by any capture.
Immediately after a completed run, on a Pixel 6a:
JS: isRecording=false, durationMs=0
Service: isForeground=true
Notification: posted, flags=ONGOING_EVENT|NO_CLEAR|FOREGROUND_SERVICE (channel=recording_service)
audio_flinger: Input device: 0 (AUDIO_DEVICE_NONE) -- mic not in use
So the three views disagree: the notification says recording, the service is still foreground, and the mic is idle. No audio is being captured. The record screen correctly shows no waveform, which is what makes it visible to a user: an ongoing recording notification while the app itself shows nothing recording.
Confirms the notification is a leftover from a service that never left the foreground, not a live capture.
Activity
abretonc7s commentedon Aug 22, 2026
Additional evidence: the stale notification is not backed by any capture.
Immediately after a completed run, on a Pixel 6a:
So the three views disagree: the notification says recording, the service is still foreground, and the mic is idle. No audio is being captured. The record screen correctly shows no waveform, which is what makes it visible to a user: an ongoing recording notification while the app itself shows nothing recording.
Confirms the notification is a leftover from a service that never left the foreground, not a live capture.
docs: correct the recipe crash claim with today's evidence
docs: make on-device validation a hard rule (#460)
test(audio-studio/android): make the #474 guard catch the leak it cla…
fix(audio-studio/android): release the service when a successor sessi…
test(audio-studio/android): assert the whole capture expression, not …
fix(audio-studio/android): stop the foreground service the default co…