-
- // Create a media scanner intent, which adds items like pictures to Android's recent file list.
- Intent mediaScannerIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
-
- // Add the URI to the media scanner intent.
- mediaScannerIntent.setData(Uri.fromFile(file));
-
- // Make it so.
- activity.sendBroadcast(mediaScannerIntent);