I used until now next code to download required files:
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));
request.setDescription("descriere");
request.setTitle(mName);
request.allowScanningByMediaScanner();
request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);
request.setDestinationInExternalPublicDir("/MyDirectory/MyFiles", mFile);
But after I updated my android version to 10 I get now next error message:
java.lang.IllegalStateException: Not one of standard directories
for
request.setDestinationInExternalPublicDir("/MyDirectory/MyFiles", mFile);
Any solutions?