You need to send a broadcast so the gallery updates it self.
Intent mediaScanIntent = new Intent("android.intent.action.MEDIA_SCANNER_SCAN_FILE");
File f = new File(image_file_path);
Uri contentUri = Uri.fromFile(f);
mediaScanIntent.setData(contentUri);
sendBroadcast(mediaScanIntent);
Edit 1: You have everything here: http://developer.android.com/training/camera/photobasics.html
You can download the example, its the only code i found that worked on all phones with picture taking, storing in my desired location and showing up in the gallery...
BUt some phones will have duplicates in gallery like HTC desire C...