Java tutorial
//package com.java2s; import android.content.Context; import android.content.Intent; import android.net.Uri; public class Main { public static void refreshGallery(Context context, Uri uri) { Intent scanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); final Uri contentUri = uri; scanIntent.setData(contentUri); context.sendBroadcast(scanIntent); } }