- MediaScannerConnection.scanFile(
- getActivity().getApplicationContext(),
- new String[]{path},
- null,null);
+ try {
+ MediaScannerConnection.scanFile(
+ getActivity().getApplicationContext(),
+ new String[]{path},
+ null,null);
+
+ Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
+ intent.setData(Uri.fromFile(new File(path)));
+ MainApp.getAppContext().sendBroadcast(intent);
+ } catch (Exception e){
+ Log_OC.d("Trigger", "exception: " + e);
+ }