androidx / androidx/media

Pause the download and not cancel the notification

Open
#1,374 1 comment 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since May 16, 2024.

enhancement
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

I'm downloading video with DownloadManager and DownloadService.
I can see download notification with progress.
When I pause download via DownloadService.sendSetStopReason notification is cancel.
I would like to resume download by click on notification button "resume" (like player play/pause)
Please tell me how to pause the download and not cancel the notification?

P.S. 1:
Yes, I can show my notification. But then the animation of canceling and adding a notification will be visible. I would like to interact with one notification (similar to the play/pause player)
P.S. 2:
As an idea, make one endless download and don't show a notification for it.
In this case, if at least one download is active, the notification will be visible.
But it’s not clear how to make sure that this download does not take up device resources/does not occupy a worker thread

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.