From 12733945456411e65c805e26214280091b21c084 Mon Sep 17 00:00:00 2001 From: Trinea Date: Tue, 8 Jul 2014 14:33:32 +0800 Subject: [PATCH] Fix download fail on some phones --- src/cn/trinea/android/demo/DownloadManagerDemo.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cn/trinea/android/demo/DownloadManagerDemo.java b/src/cn/trinea/android/demo/DownloadManagerDemo.java index ea32f69..43332cf 100644 --- a/src/cn/trinea/android/demo/DownloadManagerDemo.java +++ b/src/cn/trinea/android/demo/DownloadManagerDemo.java @@ -124,7 +124,7 @@ private void initData() { @Override public void onClick(View v) { - File folder = new File(DOWNLOAD_FOLDER_NAME); + File folder = Environment.getExternalStoragePublicDirectory(DOWNLOAD_FOLDER_NAME); if (!folder.exists() || !folder.isDirectory()) { folder.mkdirs(); }