M1-07: Ongoing notification with a working stop button #7

Open
opened 2026-08-08 20:03:44 -04:00 by agent · 0 comments
Member

A notification on the lock screen while recording, with a stop button that works without unlocking.

Wes's requirement: "It displays a live notification when it is recording with the ability to hit a
stop button on that recording, or on that notification."

This matters more than it sounds. Roughly all of his recordings happen with the screen off while
walking — pulling the phone out, unlocking it and finding the app to stop a recording is the
friction the whole project exists to remove.

Simpler than its iOS counterpart

iOS needed a whole widget extension target, because ActivityKit only lets an extension declare a
Live Activity, and the app had to perform the stop through an App Intent. Android's equivalent is
an ongoing notification with an action — the same notification the foreground service already
requires. There is no second target and no extension.

Scope

  • The foreground service's notification shows recording state and elapsed time.
  • A stop action that ends the recording. Wired to the service directly, not through an activity
    that would need the device unlocked.
  • Elapsed time that ticks — a chronometer, not a timestamp that goes stale.
  • Correct behaviour when the notification is dismissed, when the app is killed, and when the
    recording ends by other means.
  • Lock screen visibility set so the controls are usable without unlocking, and so the notification
    does not leak anything about the memo's content. It shows that a recording is running, not what
    is in it.

Done when

Wes starts a recording, turns the screen off, and stops it from the lock screen without unlocking.


Milestone 1 of Stash for Android, mirroring stash-ios M1. M1 is a functioning app on the test
device with no sync at all — record voice memos reliably and get them off the device by hand.
Sync arrives in M3.

Test device is a Pixel 6 (Tensor G1) borrowed from a friend, until something better turns up.
Stock Android, so no OEM battery-killer behaviour to fight — worth remembering that a phone from
another manufacturer may not be as forgiving about background work.

Translation of Stash/stash-ios#7. Where the platform forces a different answer this issue says so; where it
does not, the iOS issue is the fuller statement of intent and should be read alongside this one.

Working agreement for every issue in this repo: feature branch, tested before the PR opens
(on-device where the label says so), then Wes reviews the PR and we walk the code together. Docs
update in the same commit. A PR that takes more than 20 minutes to review is too big — say so and
split it.

A notification on the lock screen while recording, with a stop button that works without unlocking. Wes's requirement: *"It displays a live notification when it is recording with the ability to hit a stop button on that recording, or on that notification."* This matters more than it sounds. Roughly all of his recordings happen with the screen off while walking — pulling the phone out, unlocking it and finding the app to stop a recording is the friction the whole project exists to remove. ## Simpler than its iOS counterpart iOS needed a whole widget extension target, because ActivityKit only lets an extension declare a Live Activity, and the app had to perform the stop through an App Intent. Android's equivalent is an ongoing notification with an action — the same notification the foreground service already requires. There is no second target and no extension. ## Scope - The foreground service's notification shows recording state and elapsed time. - A **stop action** that ends the recording. Wired to the service directly, not through an activity that would need the device unlocked. - Elapsed time that ticks — a chronometer, not a timestamp that goes stale. - Correct behaviour when the notification is dismissed, when the app is killed, and when the recording ends by other means. - Lock screen visibility set so the controls are usable without unlocking, and so the notification does not leak anything about the memo's content. It shows that a recording is running, not what is in it. ## Done when Wes starts a recording, turns the screen off, and stops it from the lock screen without unlocking. --- *Milestone 1 of Stash for Android, mirroring `stash-ios` M1. M1 is a functioning app on the test device with **no sync at all** — record voice memos reliably and get them off the device by hand. Sync arrives in M3.* *Test device is a **Pixel 6** (Tensor G1) borrowed from a friend, until something better turns up. Stock Android, so no OEM battery-killer behaviour to fight — worth remembering that a phone from another manufacturer may not be as forgiving about background work.* *Translation of `Stash/stash-ios#7`. Where the platform forces a different answer this issue says so; where it does not, the iOS issue is the fuller statement of intent and should be read alongside this one.* *Working agreement for every issue in this repo: feature branch, tested before the PR opens (on-device where the label says so), then Wes reviews the PR and we walk the code together. Docs update in the same commit. A PR that takes more than 20 minutes to review is too big — say so and split it.*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Stash/stash-android#7
No description provided.