아래의 코드는 새 그림을 요청하고 자르고 임시 파일에 데이터를 씁니다. 안드로이드 2.2.1과 함께 HTC Desire HD에서 잘 작동합니다.Android : 일부 휴대 전화에서 자르기 기능이있는 ACTION_IMAGE_CAPTURE에서 카메라 앱이 작동하지 않습니다.
하지만 Android 2.2의 Huawei Ideos에서는 카메라 응용 프로그램이 중지되고 (응용 프로그램 카메라가 예기치 않게 중지됨) 내 응용 프로그램이 계속 실행됩니다. EVO 4G, Android 2.3.3을 사용하는 사용자도 유사한 문제 (아마 같은)를보고했습니다.
Ideos 휴대 전화에서 사진을 찍은 후에 자르기 상자가 보이지 않아서 카메라 응용 프로그램이 깨지는 부분 인 것 같습니다. 카메라 응용 프로그램의 장치 별 구현에 따라 다를 수 있습니다. 누구나 해결책이 있습니까?
case 1:
Uri mSavedUri = Uri.fromFile(new File(basepath + "/temp" + imgExtension));
Intent newphoto = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
newphoto.putExtra("crop", "true");
newphoto.putExtra("outputX", imageSizeX);
newphoto.putExtra("outputY", imageSizeY);
if (imageAspect == 0) {
newphoto.putExtra("aspectX", 1);
newphoto.putExtra("aspectY", 1);
}
if (imageAspect == 1) {
newphoto.putExtra("aspectX", 4);
newphoto.putExtra("aspectY", 3);
}
if (imageAspect == 2) {
newphoto.putExtra("aspectX", 3);
newphoto.putExtra("aspectY", 4);
}
newphoto.putExtra("scale", true);
newphoto.putExtra("noFaceDetection", true);
newphoto.putExtra("setWallpaper", false);
newphoto.putExtra("output",mSavedUri);
startActivityForResult(newphoto, NEW_PHOTO);
break;
감사 콘스탄틴. 며칠 후 나는 앱의 다음 버전에 대한 작업을 시작할 것이고 나는 확실히 noFaceDetection을 제거하고 어떤 일이 일어나는지 보도록 노력할 것이다. setWallpaper false는 유감스럽게도 일부 휴대폰이 사진을 배경 화면으로 설정하기 때문에 적합합니다. –