android_download_manager 1.0.3 copy "android_download_manager: ^1.0.3" to clipboard
android_download_manager: ^1.0.3 copied to clipboard

PlatformAndroid

This package lets you download files via Android Native Download Manager.

android_download_manager #

This package lets you download files via Android Native Download Manager.

Pub version License #

Getting Started #

This package lets you download files via Android Native Download Manager. This package is made available only for android.

Permissions #

  • WRITE_EXTERNAL_STORAGE
  • READ_EXTERNAL_STORAGE

How to download? #

AndroidDownloadManager.enqueue(
    downloadUrl: "https://raw.githubusercontent.com/ableco/test-files/master/images/test-image-png_4032x3024.png",
    downloadPath: Directory.systemTemp.path,
    fileName: "test.png",
);
Type Description
downloadUrl String The url of the file to be downloaded
downloadPath String The location where the downloaded file to be saved
fileName String Name of the downloaded file with extension
description (optional) String Description for the download manager
headers (optional) Map<String, String> Headers for the download url
allowScanningByMediaScanner (optional) bool Whether allow download manager to scan by MediaScanner
notificationVisibility (optional) NotificationVisibility VISIBILITY_VISIBLE
VISIBILITY_VISIBLE_NOTIFY_COMPLETED
NETWORK_MOBILE
NETWORK_WIFI
VISIBILITY_HIDDEN
VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION

Listen to completed downloads #

AndroidDownloadManager.listen((data) {
    String id = data["id"];
    log("Download complete");
  });

Here we receive IDs of the completed downloads.

11
likes
120
pub points
78%
popularity

Publisher

verified publisherpub.tamilkannancv.dev

This package lets you download files via Android Native Download Manager.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on android_download_manager