Allow DownloadManager do automatic track selection
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
### Issue description
Whenever I start a download (~by calling `DownloadService.sendAddDownload()`~ see [this comment](https://github.com/google/ExoPlayer/issues/5915#issuecomment-494668591)) while offline, I don't see the download queued when I check the downloads in the `DownloadManager` (either through `currentDownloads` or `downloadIndex`). Calling `isWaitingForRequirements()` returns false, but as soon as the connection is back, the download starts automatically as if it was queued and waiting for requirements.
I did some debugging and was able to see within `DownloadManager` that `notMetRequirements` was correctly `1` but the `downloads` list was empty -- it seems that's where the issue is.
I don't think it's relevant, but just in case: I'm downloading HLS content and this is how my helper creation looks like:
```kotlin
DownloadHelper.forHls(
uri,
dataSourceFactory,
DefaultRenderersFactory(context),
null,
DefaultTrackSelector.ParametersBuilder().setForceHighestSupportedBitrate(true).build()
)
```
### Reproduction steps
I can try to reproduce this with the demo app or try to create another demo for this issue if it'd really be helpful, but I think the issue is pretty straightforward to reproduce and observe:
- Make sure device is not connected to the internet
- Start a download
- Observe inconsistencies:
- There's no downloads queued even though they'll start automatically once connection is back.
- `notMetRequirements` is `1`, even though `isWaitingForRequirements()` is false.
### Link to test content
I believe this isn't relevant.
### A full bug report captured from the device
Hopefully also not relevant.
### Version of ExoPlayer being used
2.10.0 and 2.10.1
### Device(s) and version(s) of Android being used
Samsung Note 8 and Pixel 2 emulator on API 26. It's reproducible every time.
Contributor guide
Assessment
This issue has not been assessed yet.