fluttercommunity/flutter_downloader

flutter downloader is not downloading in Android versions of 13 and 14

sabari7320 opened this issue · 2 comments

Describe the bug

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. 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

i have same issue if anyone knows exact solution let me know

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();