私は、ダウンロードマネージャを使用していると私はAndroidのダウンロードマネージャsetDestinationInExternalFilesDir
setDestinationInExternalFilesDir(this, Environment.DIRECTORY_DOWNLOADS, "example.ext");
を使用するときにファイルがダウンロードフォルダ/アンドロイド/データ/ com.example.app /ファイルにダウンロードされます。
私は
setDestinationInExternalPublicDir("/folder", "example.ext");
をしようとすると、私が得る: IllegalStateException: Cannot create directory mnt/sdcard/folder
。 WRITE_EXTERNAL_STORAGE権限も設定しました。
私は間違っていますか?
は、私は次のことを試してみました。 downloadRequest.setDestinationInExternalFilesDir(v.getContext()、folder、down.getTitle()+ "。epub")); ファイルは ファイルにダウンロードされます:///mnt/sdcard/Android/data/com.example.app/files/*folder-path* –
Android/Androidからダウンロードしたファイルを移動して一時的に修正しました。 data/com.example.app/filesを必要なディレクトリにコピーします。 –