1
내 개발 환경은 mac osx, appcelerator sdk 5.3.0이며 Google nexus Android 6.0에서 테스트합니다. Ti.Media.show 권한이 부여 되더라도 카메라가 열리지 않습니다. 다음은 콘솔 로그에서 내 코드카메라 권한이 부여 된 경우에도 Ti.Media.show 카메라가 표시되지 않습니다. Android 6.0 Titanium
function openCamera(parms) {
if (Ti.Media.hasCameraPermissions) {
Ti.API.error("Yes has camera permission");
Ti.Media.showCamera({
success : function(event) {
parms.source.image = newBlob;
},
cancel : function() {
Ti.API.error("User cancelled pictur selection");
},
error : function(error) {
var a = Ti.UI.createAlertDialog({
title : 'Camera Error'
});
if (error.code == Ti.Media.NO_CAMERA) {
a.setMessage("No Camera Found!");
} else {
a.setMessage('Unexpected Error: ' + error.code);
}
a.show();
},
mediaTypes : [Ti.Media.MEDIA_TYPE_PHOTO],
animated : true,
autoHide : true,
allowEditing : true,
saveToPhotoGallery : false,
showControls : true
});
} else {
Ti.API.error("No camera permission. Asking for Permission");
Ti.Media.requestCameraPermissions(function(e) {
Ti.API.error(JSON.stringify(e));
if (e.success === true) {
openCamera(parms);
} else {
alert("Access denied, error: " + e.error);
}
});
}
};
인이
예 카메라 권한이 표시
[WARN] : InputEventReceiver : 입력 이벤트 수신기가 이미 가지고있는 입력 이벤트 만 을 완료 시도 처리되었습니다.
누군가가 나를 잘못 가리켜 주겠습니까?
감사합니다. 지금 일하고있어. –