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 scanMediaFileToGallery(Context context, String path) { File file = new File(path); Uri uri = Uri.fromFile(file); Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, uri); context.sendBroadcast(intent); } }