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