Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  2. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  3. <uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
  4.  
  5. _downloadFile2 = () => {
  6. let DownloadDir = RNFetchBlob.fs.dirs.DownloadDir
  7. let options = {
  8. fileCache: true,
  9. addAndroidDownloads : {
  10. useDownloadManager : true,
  11. notification : true,
  12. title : "file name",
  13. path: DownloadDir + '/' + "fileName"+ '.' + 'pdf',
  14. description : 'download fileName'
  15. }
  16. }
  17. RNFetchBlob.config(options)
  18. .fetch('GET', 'link....')
  19. .catch((err) => {console.warn('error' + err)})
  20. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement