I have to store the download the image from the url using DownloadManager and store it into the sdcard with my own directory like \"xyz\". This is my code
Fi
Caused by: java.lang.IllegalStateException: Unable to create directory: /storage/emulated/0/storage/emulated/0/xyz at android.app.DownloadManager$Request.setDestinationInExternalPublicDir(DownloadManager.java:538)
Issue seems it be related with Android Runtime Permission introduced in Android 6.0
When your app targeting is API Level 23 or higher, by default all the permissions are false
. To resolve this, you have to request a permission dialog and approve the permission before using that into your app.