DownloadManager.Request.setNotificationVisibility fails with jSecurityException: invalid value for visibility: 1
I am trying to use the DownloadManager to download large PDF files from my app. I want notifications to be displayed during the download as well as when the download finishes. However setting the visibility causes above exception. This error is different from this post DownloadManager.Request.setNotificationVisibility fails with jSecurityException: invalid value for visibility: 2 The other post is asking for help when setting the visibility to VISIBILITY_HIDDEN for which you need permission in the manifest. I am trying to set the visibility to DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY