Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 3, 2025

This PR contains the following updates:

Package Type Update Change Pending
background_downloader dependencies major ^8.5.5 -> ^9.0.0 9.1.0

Release Notes

781flyingdutchman/background_downloader (background_downloader)

v9.0.0

  • Introduces URI operations, including file/photo/video/directory pickers, under the uri property, and UriDownloadTask and UriUploadTask. See Working with URIs.
  • [Breaking] removes references to asAndroidUri - use the new methods on the uri property instead
  • Adds enqueueAll to enqueue a list of tasks (non-blocking and with better performance when compared to calling enqueue for each task)
  • Adds native callback beforeTaskStartCallback to TaskOptions, that is called just before the task starts executing. If it returns a non-null TaskStatusUpdate then this forces the task to finish before it starts, with that TaskStatusUpdate
  • Adds option to configure a canceled notification (instead of cancellation defaulting to the error notification)
  • Fixes bug with request when using PUT or PATCH requests
  • Fixes bug for multi-part uploads when field values are formatted as a JSON string and contain non-ASCII characters
  • Bumps minimum iOS version to 14
Uri operations

Uri operations abstract away platform differences, including content provider on Android (used for the Storage Access Framework), and file, photo and directory pickers on iOS and Android. This enables largely platform-independent code for file operations, and on Android downloads directly to destination, bypassing the temp file in internal storage.

The FileDownloader().uri property provides access to a set of utility functions for working with URIs, including:

  • pickDirectory(): Opens a directory picker dialog and returns the selected directory's URI.
  • pickFile(): Opens a file picker dialog and returns the selected file's URI.
  • pickFiles(): Opens a file picker dialog and allows selection of multiple files, returning their URIs in a list.
  • createDirectory(): Creates a new directory within a specified parent directory URI.
  • getFileBytes(): Retrieves the file data (bytes) for a given URI.
  • copyFile(): copies a file from a source uri to a destination. Destination can be a Uri, a File or a String containing a file path
  • moveFile(): moves a file from a source uri to a destination. Destination can be a Uri, a File or a String containing a file path. If the move fails, it is possible that the file was copied but the source was not deleted
  • deleteFile(): Deletes the file at the given URI.
  • openFile(): Opens the file at a given URI.
  • moveToSharedStorage(): Moves a file to a shared storage location.
  • activate(): Activates a previously accessed directory or file. Only relevant if you use persistedUriPermission or use the photo/video picker.

The pick... methods and createDirectory take an optional persistedUriPermission argument (defaults to false) that when true registers the picked directory with the OS, allowing access in a later session.

New/modified Task types:

  • UriDownloadTask: Downloads a file to a specified directory URI. On Android, this bypasses the temp file used in the traditional approach and downloads directly to the destination.
  • UriUploadTask: Uploads a file from a given file URI. If the filename is omitted, it will be based on the task's URL.
  • MultiUploadTask: now accepts Uri where previously only filename or file path was allowed

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added changelog:skip dependencies Pull requests that update a dependency file labels Mar 3, 2025
@zackpollard zackpollard closed this Mar 3, 2025
@renovate
Copy link
Contributor Author

renovate bot commented Mar 3, 2025

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 9.x releases. But if you manually upgrade to 9.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/background_downloader-9.x branch March 3, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:skip dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants