fluttercommunity / fluttercommunity/flutter_downloader
How to change the downloading directory in android
- Dominant language
- Kotlin
- Stars
- 940
- Forks
- 561
- Avg merge
- 1h 18m
- Merged PRs (30d)
- 1
Description
how to setup the custom path for downloading files in android
I want to download the video in my app Folder (storage/emulated/0/MyAppName),
How it possible
My code,
final externalDir = await getExternalStorageDirectory();
final taskId = await FlutterDownloader.enqueue(
url: myurl,
savedDir: externalDir.path,
fileName: myvideo.mp4,
showNotification: true,
openFileFromNotification: true,
);
i have already tried the all path providers
final externalDir = await getTemporaryDirectory();
final externalDir1 = await getApplicationSupportDirectory();
// final externalDir2 = await getLibraryDirectory(); //for ios
final externalDir3 = await getApplicationDocumentsDirectory();
final externalDir4 = await getExternalStorageDirectory();
final externalDir5 = await getExternalCacheDirectories();
final externalDir6 = await getExternalStorageDirectories();
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.