Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid value for visibility : 2 #191

Open
stueynet opened this issue Sep 25, 2018 · 7 comments
Open

Invalid value for visibility : 2 #191

stueynet opened this issue Sep 25, 2018 · 7 comments

Comments

@stueynet
Copy link

Continuing this from the original repo. This happens downloading files via fetch with rn-fetch-blob. Cannot seem to track down a cause here.

wkh237#726

@bassie97
Copy link

bassie97 commented Oct 1, 2018

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 :)

@AppleMango23
Copy link

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??

@AppleMango23
Copy link

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.

@ashokkumar88
Copy link

@nonoyek where you changed the visibility?

@twotwins
Copy link

twotwins commented Nov 4, 2019

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

@Charles-Dahl
Copy link

confirmed that
{ addAndroidDownloads: { useDownloadManager: true, notification: true, } }
works.
I suggest notification should default to true if it's not added in the config.

@peraltafederico
Copy link

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 :)

It worked for me!!

cguino pushed a commit to BeApp/rn-fetch-blob that referenced this issue Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants