Open sattaman opened 4 years ago
I'm going to have a go at fixing this , any pointers would be received gratefully , as I'm no java dev !
I think I've found the issue and how to get it working, useDownloadManager
needed adding (although up until now it has worked without), and I also needed to duplicate the path (undocumented I think?) . Is this the expected behaviour? I can do a pr to update the docs if so? Or should the path for the android downloads be being passed down from the root config?
return RNFetchBlob.config({
fileCache: true,
path: `${RNFetchBlob.fs.dirs.DownloadDir}/${filename}.${ext}`,
addAndroidDownloads: {
path: `${RNFetchBlob.fs.dirs.DownloadDir}/${filename}.${ext}`, // path needed duplicating here
useDownloadManager: true, // without this it works < android 10 , but crashes in android 10
notification: true,
title,
mime: mimeType,
mediaScannable: true,
},
}).fetch(...
Hi i resolved this issue adding: <application .... android:requestLegacyExternalStorage="true"
to the manifest.
Here the explication: https://stackoverflow.com/questions/56821095/android-q-file-mkdirs-returns-false
I am using
My setup is as follows:
This code has been running in production for a while with no issues, but is crashing on Android 10 with the following error:
As a temporary work around , I have found removing
addAndroidDownloads
completely stops the crash.