문제 설명
phonegap 카메라가 앱 충돌 (phonegap camera crashes the app)
phonegap 카메라 API를 사용하여 여러 장의 사진을 찍은 후 Phonegap 앱이 충돌합니다. 각 사진 후에 발생하는 것이 아니라 여러 사진을 찍은 후에만 발생합니다. RAM이 해제되지 않아 충돌이 발생한다고 생각합니다. 메시지: 불행히도 갤러리가 중지되었습니다. RAM 메모리를 강제로 해제하는 방법이나 다른 해결 방법을 도와주세요. 의미: W/QComExtractorFactory(174): sniff <=== status = 1
고마워요
LogCat이 다음과 일치하지 않습니다.
11‑27 18:06:55.751: E/camera(1799): 전송 톤 바: mSkinToneSeekBar = false
11‑27 18:06:55.751: D/CameraStorage(1799): 외부 저장소 상태=마운트됨
11‑27 18:06:55.771: E/WVMExtractor(174): libwvm.so를 열지 못했습니다.
11‑27 18:06:55.771: W/QComExtractorFactory(174): 하지 않았습니다.
참조 솔루션
방법 1:
Make sure that you are working like this.
navigator.camera.getPicture(function(imageURL){
fileURI = imageURL;
fileName = fileURI.substr(fileURI.lastIndexOf('/') + 1);
window.resolveLocalFileSystemURI(fileURI, function(fileEntry) {
fileEntry.file(function(fileObj) {
fileSize = fileObj.size;
fileType = fileObj.type;
});
});
}, function(){
alert('failed');
}, {
quality: 50,
destinationType: navigator.camera.DestinationType.FILE_URI,
sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY
});
},
(by user2929078、Ashish)