2013年3月21日 星期四

ANDROID SD卡中無法立刻完全刪除檔案

Root cause : Android has a cache of file that keeps track of media files.

sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" + Environment.getExternalStorageDirectory())));

It makes the MediaScanner service run again, which should remove the deleted file image from the device's cache.