Java tutorial
//package com.java2s; import android.annotation.TargetApi; import android.content.Context; import android.media.MediaScannerConnection; import android.os.Build; public class Main { @TargetApi(Build.VERSION_CODES.FROYO) public static void scanFile(Context context, String path) { MediaScannerConnection.scanFile(context, new String[] { path }, null, null); } }