I'm trying ti use DownloadManager
class in my app to download a file from a url.
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));
dm = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE);
enqueue = dm.enqueue(request);
this code produces:
Caused by: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.downloads.DownloadProvider from ProcessRecord{4099d440 5576:com.digitalaria.gama.sample.carousel/10134} (pid=5576, uid=10134) requires android.permission.ACCESS_ALL_DOWNLOADS or android.permission.ACCESS_ALL_DOWNLOADS
how to solve the problem?