安卓:使用下载管理器从互联网上下载文件并保存到内部存储器
问题描述:
我使用的下载从Web文件到我的Android设备下载管理器
。我使用节省了SD卡这个文件:
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?
答
使用此路径 .setDestinationInExternalPublicDir(Environment.getExternalStorageDirectory()
+/ Android的/数据/ xxx.xxx.xxx /文件/)