啟動照相機

Intent it = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

//假設你要將相片存在 /sdcard/xxx.jpg 中

File f = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/xxx.jpg");

it.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(f));

startActivity(it, 0);

詳細相機操作