-
- // Notify MediaScanner about removed file
- Intent intent1 = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
- intent1.setData(Uri.fromFile(new File(this.getStoragePath())));
- MainApp.getAppContext().sendBroadcast(intent1);
-
- // Notify MediaScanner about new file
- Intent intent2 = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
- String folder = new File(this.getStoragePath()).getParent();
- intent2.setData(Uri.fromFile(new File(folder+ PATH_SEPARATOR+name)));
- MainApp.getAppContext().sendBroadcast(intent2);