Android 摄像机意图不';拍照后不要回来

Android 摄像机意图不';拍照后不要回来,android,camera,Android,Camera,我只在两台设备(Droid Razr 4.1.2和Galaxy S3 4.1.1)上测试过这个功能,它在Razr上工作,但在S3上它尝试拍摄另一张照片。我怎样才能解决这个问题 //starts camera Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photoPath)); startActivityForRe

我只在两台设备(Droid Razr 4.1.2和Galaxy S3 4.1.1)上测试过这个功能,它在Razr上工作,但在S3上它尝试拍摄另一张照片。我怎样才能解决这个问题

//starts camera
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(photoPath));
startActivityForResult(intent, PHOTO);



//when camera intent is done
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        if(resultCode == RESULT_OK){
            if(requestCode == PHOTO){
                MP = new MediaPackage(photoPath.getAbsolutePath(), MediaPackage.IMAGE);
                if(MP.getThumb()!=null)
                    ((ImageView)findViewById(R.id.New_Post_Add_Image)).setImageBitmap(MP.getThumb());
            }
        }
    }