Code example for MediaScannerConnection

Methods: connect

	public InformaMediaScanner(Activity a, File f) {
		this.f = f;
		this.a = a;
		msc = new MediaScannerConnection(a, this);
	public void onMediaScannerConnected() { 
		msc.scanFile(f.getAbsolutePath(), null);
	public void onScanCompleted(String path, Uri uri) {
		((OnMediaScannedListener) a).onMediaScanned(uri);
	public static Uri getUriFromFile(Context context, File file) {
Connect your IDE to all the code out there  Get Codota for Java