Code example for MediaScannerConnection

Methods: connect

0
	} 
	 
	public InformaMediaScanner(Activity a, File f) {
		this.f = f;
		this.a = a;
		msc = new MediaScannerConnection(a, this);
		msc.connect();
	} 
	 
	@Override 
	public void onMediaScannerConnected() { 
		msc.scanFile(f.getAbsolutePath(), null);
	} 
 
	@Override 
	public void onScanCompleted(String path, Uri uri) {
		((OnMediaScannedListener) a).onMediaScanned(uri);
	} 
	 
	public static Uri getUriFromFile(Context context, File file) {
		Uri uri = null;