1
這裏是我的方案Android的按鈕顯示下載文件
用戶從我的應用程序下載文件
用戶按下菜單按鈕,轉到位於SD卡下載的文件
請告訴我如何實現鏈接到SD卡位置的按鈕
b elow是我的代碼。
File sdCard = Environment.getExternalStorageDirectory();
File dir = new File (sdCard.getAbsolutePath() + "/downloaded/stuffs");
dir.mkdirs();
File file = new File(dir, fileName);
InputStream input = new BufferedInputStream(url.openStream());
FileOutputStream f = new FileOutputStream(file);
你想要一個按鈕,當點擊時,列出SDCard上的文件? – Spidy 2012-08-03 03:21:32
感謝Spidy的回覆。我只想要一個簡單的按鈕鏈接到我的SD位置下載的文件。請回復 。再次感謝 – 2012-08-03 03:43:30
任何人?請幫忙 – 2012-08-03 05:40:31