2
基本上即時嘗試刷新sd卡爲了讓圖像縮略圖代表其相應的圖片。原因是用戶可以將圖片發送到服務器,服務器對其執行圖像處理,然後將其返回。它首次出現在畫廊中。然而,後續請求導致第一個縮略圖始終用於新圖像。新圖像總是覆蓋舊圖像(按設計),但縮略圖保持不變。android,刷新圖像縮略圖或sd卡在調用意圖選擇圖像之前
目前我嘗試這個刷新SD卡
sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED,
Uri.parse("file://"+ Environment.getExternalStorageDirectory())));
它不但是工作。基於我的實現下面有無論如何,我可以刷新SD卡在選擇圖像意圖開始之前?
//if the user selects the file browser
//open the file browser and present the available images
if(v == choose){
//refresh the sd card before viewing the images
sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED,
Uri.parse("file://"+ Environment.getExternalStorageDirectory())));
startActivityForResult(new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI), SELECT_IMAGE);
編輯:我也試過這種http://www.mail-archive.com/[email protected]/msg24164.html但無濟於事
編輯2:我也試圖保存新,但之前刪除的文件,它沒有用縮略圖僅僅停留在同一
編輯3:我使用的設備是一個HTC英雄,我也嘗試過使用LG gt540,並且問題沒有發生,因爲縮略圖刷新時沒有刷新,這讓我相信它可能是一個有htc實現的bug。有沒有其他人經歷過這個?