Cómo ver la aplicación de la cámara tomar una foto asíncrona en la galería

Estoy trabajando en una aplicación de cámara básica. Puedo tomar una foto, y puedo verla en mi aplicación. Pero quiero ver mi foto en la galería de forma asíncrona. Al reiniciar el teléfono, puedo ver mi foto en la galería.

Código de muestra.

public class PhotosActivity extends Fragment implements View.OnClickListener {

    private final int REQUEST_CODE   = 100;

    private Button fotobutton;
    private ImageView foto_image;
    private static final String IMAGE_DIRECTORY_NAME = "OlkunMustafa";
    public static final int MEDIA_TYPE_IMAGE = 1;

    private Uri fileUri;
    // Directory name to store captured images and videos

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

        View rootView       = inflater.inflate(R.layout.photos_activity,container,false);
        fotobutton          = (Button) rootView.findViewById(R.id.fotobutton);
        foto_image          = (ImageView) rootView.findViewById(R.id.foto_image);

        fotobutton.setOnClickListener(this);

        return rootView;
    }

    @Override
    public void onClick(View v) {
        if( v == fotobutton) {
            Intent photo_intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

            fileUri = getOutputMediaFile(MEDIA_TYPE_IMAGE);
            photo_intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);

            startActivityForResult(photo_intent,100);
        }
    }

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if(resultCode == getActivity().RESULT_OK)
        {
            BitmapFactory.Options options = new BitmapFactory.Options();
            final Bitmap bitmap = BitmapFactory.decodeFile(fileUri.getPath(),
                    options);
            foto_image.setImageBitmap(bitmap);

            Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
            Uri contentUri = getOutputMediaFile(MEDIA_TYPE_IMAGE);
            mediaScanIntent.setData(contentUri);
            getActivity().sendBroadcast(mediaScanIntent);
        }
    }

    private static Uri getOutputMediaFile(int type) {

        // External sdcard location
        File mediaStorageDir = new File(
                Environment
                        .getExternalStorageDirectory(),
                IMAGE_DIRECTORY_NAME);

        // Create the storage directory if it does not exist
        if (!mediaStorageDir.exists()) {
            if (!mediaStorageDir.mkdirs()) {
                Log.d(IMAGE_DIRECTORY_NAME, "Oops! Failed create "
                        + IMAGE_DIRECTORY_NAME + " directory");
                return null;
            }
        }

        // Create a media file name
        String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss",
                Locale.getDefault()).format(new Date());
        File mediaFile;
        if (type == MEDIA_TYPE_IMAGE) {
            mediaFile = new File(mediaStorageDir.getPath() + File.separator
                    + "IMG_" + timeStamp + ".jpg");
        } 
        else {
            return null;
        }

        return Uri.fromFile(mediaFile);
    }
}

¿Cómo puedo hacerlo?

Respuestas a la pregunta(2)

Su respuesta a la pregunta