I used DownloadManager
in my android project to download 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 of 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 their DownloadManger
is disable. but I saw in android devices that android version is 4 they do not have ability to disable it. can anybody help me why this error happens?