我只在两台设备(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());
}
}
}