ผมอยากทราบว่าโค้ดเรียกใช้งานทั้งหมดมันเป้นอย่างไงผมเขียนหลายรอบแล้วยังทำไม่ได้เลย

มีคนเอาโค้ดนี้ไปเขียนให้เป็นตัวอย่างให้ผมได้หรือป่าวคับ
ขอบคุณคับ

_______________________________________________________________________________________________________
ส่วนนี้เป็นส่วนเรียกใช้งานกล้อง
public void onClickLaunchCamera(View view)
{
try
{
toastText("Launching Camera");
Intent intent = Intent("android.media.action.IMAGE_CAPTURE");
File photo = new File(Environment.getExternalStorageDirectory(), "Pic.jpg");
intent.putExtra(MediaStore.EXTRA_OUTPUT,Uri.fromFile(photo));
imageUri = Uri.fromFile(photo);
startActivityForResult(intent, TAKE_PICTURE);
}
catch (Exception e)
{
Log.e(TAG, e.toString());
}
}
________________________________________________________________________________________________
ส่วนประมวลผลการตัดรูปภาพ
case TAKE_PICTURE:
if (resultCode == Activity.RESULT_OK)
{
Uri selectedImage = imageUri;
getContentResolver().notifyChange(selectedImage, null);
ImageView inageView = (ImageView) findViewById(R.id.imageView1);
ContentResolver cr = getContentResolver();
try {
takenPictureBitmap = android.provider.MediaStore.Images.Media.
getBitmap(cr, selectedImage);
imageView.setImageBitmap(takenPictureBitmap);
Toast.makeText(this, selectedImage.toString(),
Toast.LENGTH_LONG).show();
perfromCrop();
}catch (Exception e){
Toast.makeText(this, "Failed to load", Toast.LENGTH_SHORTL)
.show();
Log.e(TAG, e.toString());
}
}
break;
[สอบถาม] เกี่ยวกับโค้ด กล้องAndroid
ขอบคุณคับ
_______________________________________________________________________________________________________
ส่วนนี้เป็นส่วนเรียกใช้งานกล้อง
public void onClickLaunchCamera(View view)
{
try
{
toastText("Launching Camera");
Intent intent = Intent("android.media.action.IMAGE_CAPTURE");
File photo = new File(Environment.getExternalStorageDirectory(), "Pic.jpg");
intent.putExtra(MediaStore.EXTRA_OUTPUT,Uri.fromFile(photo));
imageUri = Uri.fromFile(photo);
startActivityForResult(intent, TAKE_PICTURE);
}
catch (Exception e)
{
Log.e(TAG, e.toString());
}
}
________________________________________________________________________________________________
ส่วนประมวลผลการตัดรูปภาพ
case TAKE_PICTURE:
if (resultCode == Activity.RESULT_OK)
{
Uri selectedImage = imageUri;
getContentResolver().notifyChange(selectedImage, null);
ImageView inageView = (ImageView) findViewById(R.id.imageView1);
ContentResolver cr = getContentResolver();
try {
takenPictureBitmap = android.provider.MediaStore.Images.Media.
getBitmap(cr, selectedImage);
imageView.setImageBitmap(takenPictureBitmap);
Toast.makeText(this, selectedImage.toString(),
Toast.LENGTH_LONG).show();
perfromCrop();
}catch (Exception e){
Toast.makeText(this, "Failed to load", Toast.LENGTH_SHORTL)
.show();
Log.e(TAG, e.toString());
}
}
break;