Java tutorial
//package com.java2s; import android.app.Activity; import android.content.Intent; import android.net.Uri; public class Main { /** * copy current image to Gallery */ public static void galleryAddPic(Uri currentImageUri, Activity activity) { Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE); mediaScanIntent.setData(currentImageUri); activity.sendBroadcast(mediaScanIntent); } }