flutter downloader is not downloading in Android versions of 13 and 14
sabari7320 opened this issue · 2 comments
sabari7320 commented
Describe the bug
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
Screenshots
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Device information:
- Device: [e.g. iPhone 13]
- OS: [e.g. iOS 15.4]
- plugin version [e.g. v1.8.0]
Additional context
sabari7320 commented
i have same issue if anyone knows exact solution let me know
sabari7320 commented
i resolved in my code has this issue
void PDFDownloadURL(String url,String name) async {
print("Applicant Resume download");
final mediastatus=await Permission.mediaLibrary.request();
print(mediastatus);
if(mediastatus.isGranted){
final baseStorage=await getExternalStorageDirectory();
final id=await FlutterDownloader.enqueue(
url: url, savedDir:baseStorage!.path,
fileName: "${name}_Resume.pdf",
showNotification: true, // show download progress in status bar (for Android)
openFileFromNotification: true, // click on notification to open downloaded file (for Android)
);
}
else{
print("NO permission");
}
}
I added this Permission.mediaLibrary.request();
insted of Permission.storage.request();