Java tutorial
//package com.java2s; import java.io.File; import android.content.Context; import android.content.Intent; import android.net.Uri; public class Main { public static void scanPhoto(Context ctx, String imgFileName) { Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); File file = new File(imgFileName); Uri contentUri = Uri.fromFile(file); mediaScanIntent.setData(contentUri); ctx.sendBroadcast(mediaScanIntent); } }