Java tutorial
//package com.java2s; import android.app.Activity; import android.content.Intent; import android.provider.MediaStore; public class Main { public static void toTakePicture(int requestcode, Activity activity) { Intent intent = new Intent(Intent.ACTION_PICK, null); intent.setDataAndType(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*"); activity.startActivityForResult(intent, requestcode); } }