Continuing this from the original repo. This happens downloading files via fetch with rn-fetch-blob. Cannot seem to track down a cause here.
https://github.com/wkh237/react-native-fetch-blob/issues/726
If you're using 'addAndroidDownloads' in your RNFetchBlob config then you have to give android permission to DOWNLOAD_WITHOUT_NOTIFICATION in your AndroidManifest.xml
<uses-permission
android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" /
For reference: https://stackoverflow.com/questions/9345977/downloadmanager-request-setnotificationvisibility-fails-with-jsecurityexception
Hope this helps you :)
If you're using 'addAndroidDownloads' in your RNFetchBlob config then you have to give android permission to DOWNLOAD_WITHOUT_NOTIFICATION in your AndroidManifest.xml
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" /For reference: https://stackoverflow.com/questions/9345977/downloadmanager-request-setnotificationvisibility-fails-with-jsecurityexception
Hope this helps you :)
i added the permision into my android manifest but the error still there.. and actually i wanted it to be visible is there any other solution??
solved it.. i change the visibility into visible and the error solve, can try this if really still not working after using all the solution.
@nonoyek where you changed the visibility?
addAndroidDownloads : {
useDownloadManager : true, // setting it to true will use the device's native download manager and will be shown in the notification bar.
notification : true,
description : 'Downloading image.',
},
tested and work fine in android u need to change notification to true
confirmed that
{
addAndroidDownloads: {
useDownloadManager: true,
notification: true,
}
}
works.
I suggest notification should default to true if it's not added in the config.
Most helpful comment
If you're using 'addAndroidDownloads' in your RNFetchBlob config then you have to give android permission to DOWNLOAD_WITHOUT_NOTIFICATION in your AndroidManifest.xml
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" /For reference: https://stackoverflow.com/questions/9345977/downloadmanager-request-setnotificationvisibility-fails-with-jsecurityexception
Hope this helps you :)