I used DownloadManagerin my Android project to upload a file.
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(soundURL));
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_HIDDEN);
deleteIfFileExist(filePath);
request.setDestinationInExternalFilesDir(context, SubPath, SndName);
return manager.enqueue(request);
it works fine, but I saw in Fabric that some users reported a crash:
Fatal Exception: java.lang.IllegalArgumentException: Unknown URL content://downloads/my_downloads
at android.content.ContentResolver.insert(ContentResolver.java:882)
at android.app.DownloadManager.enqueue(DownloadManager.java:904)
I searched about it and found somewhere because they are DownloadMangerdisabled. but I saw on Android devices that the version for Android is 4, they don’t have the ability to disable it. can someone help me why this error is happening?
source
share