我正在使用PhoneGap(Cordova 1.6.1)開發Android應用程序。當我調用相機API時,我的應用程序崩潰,我收到諸如「在非活動InputConnection上的showStatusIcon」等日誌消息。我已經使用以下方法調用相機:Phonegap Camera應用程序崩潰
function capturePhoto() {
// Take picture using device camera and retrieve image as base64-encoded string
navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50,
destinationType: destinationType.DATA_URL });
}
function onPhotoDataSuccess(imageData) {
var smallImage = document.getElementById('smallImage');
smallImage.style.display = 'block';
smallImage.src = "data:image/jpeg;base64," + imageData;
}
function onFail(message) {
alert('Failed because: ' + message);
}