Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
- <uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
- _downloadFile2 = () => {
- let DownloadDir = RNFetchBlob.fs.dirs.DownloadDir
- let options = {
- fileCache: true,
- addAndroidDownloads : {
- useDownloadManager : true,
- notification : true,
- title : "file name",
- path: DownloadDir + '/' + "fileName"+ '.' + 'pdf',
- description : 'download fileName'
- }
- }
- RNFetchBlob.config(options)
- .fetch('GET', 'link....')
- .catch((err) => {console.warn('error' + err)})
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement