What can I do?
If you read the documentation for setDestinationInExternalPublicDir()
, you will see that the first parameter is "the directory type to pass to getExternalStoragePublicDirectory(String)
". That needs to be one of the constants defined on the Environment
class, like Environment.DIRECTORY_DOWNLOADS
. You are passing something else, which is not supported.