Each time I use the phonegap API function to create an image on iOS, after I click on Use photo I get a warning. (The memory usage spikes to roughly 60MB)
My code:
navigator.camera.getPicture(onSuccess, onFail, { quality: 20 });
function onSuccess(imageData) {
console.log('succ');
}
function onFail(message) {
alert('Failed because: ' + message);
}
Warning:
2014-05-17 10:56:35.122 Cityfe[1845:60b] Received memory warning.
2014-05-17 10:56:35.195 Cityfe[1845:60b] succ
Is this something to be worried about?
try this one
function getPhoto(source) {
// Retrieve image file location from specified source
navigator.camera.getPicture(onSuccess, onFail, {
quality: 30,
targetWidth: 600,
targetHeight: 600,
destinationType: navigator.camera.DestinationType.FILE_URI,
correctOrientation: true,
sourceType: source
});
}
function onSuccess(imageData) {
console.log('succ');
}
function onFail(message) {
alert('Failed because: ' + message);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.