4

I am downloading a file from the web to my Android device using DownloadManager. I am saving this file on the sdcard using:

DownloadManager.Request req = new DownloadManager.Request(Uri.parse("file path"));
req.setTitle("file title").setDescription("Downloading ....") // download the package at the /sdcard/download path.
.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, "file name"+ "file extension");

I want to save it to the internal storage. How to do that?

Dipak Keshariya
  • 22,193
  • 18
  • 76
  • 128
user1471575
  • 731
  • 2
  • 15
  • 23

1 Answers1

1

use this path .setDestinationInExternalPublicDir(Environment.getExternalStorageDirectory() +"/Android/data/xxx.xxx.xxx/files/")

Mohsin Naeem
  • 12,542
  • 3
  • 39
  • 53