DownloadManager.Request.setNotificationVisibility fails with SecurityException: invalid value for visibility: 2

前端 未结 2 1905
予麋鹿
予麋鹿 2020-12-15 15:24

I\'m trying to use DownloadManager in a Service class of mine:

    DownloadManager downloadManager = (DownloadManager) getSystemSer         


        
相关标签:
2条回答
  • 2020-12-15 15:41

    You need the following permission in the manifest as per documentation:

    <uses-permission
            android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
    
    0 讨论(0)
  • 2020-12-15 15:41

    but also need to add that permission to rn-fetch-blob's manifest that is not given in it.

    <uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
    
    0 讨论(0)
提交回复
热议问题