androidx / androidx/media

Is DownloadManager respecting the WorkManager network?

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

@marcbaechinger is already working on this.

Since Mar 18, 2024.

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

Description

A general question, not blocking just trying to understand the guarantees.

I'm looking at how to ensure we use the right network for downloads.

The WorkManagerScheduler code https://github.com/androidx/media/blob/d13a0f4ec62ca092b79746a5725b62a3244cc5b4/libraries/exoplayer_workmanager/src/main/java/androidx/media3/exoplayer/workmanager/WorkManagerScheduler.java#L39
sets network requirements.

But WorkerParameters has getNetwork, which identifies the network matching those requirements.

It doesn't seem like this gets to CronetDataSource or other DataSource in order to ensure the right network is used.

If Wifi is requested and available for downloads, but there is an existing pooled connection (say over BT on Wear), where is this handled?

Side question: Can these constraints be applied for streaming to avoid LTE traffic? Is there a good pattern?

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.