camera.getPicture用于捕获cordova中的图像。该项目是使用cordova 3.2.0开发的。现在我已将Cordova更新到3.8.0。现在navigator.camera.getPicture没有调用成功调用和失败调用。经过一些试验后,我发现它的发生是由于将这3个参数添加到选项
中allowEdit : true,
targetWidth: 250,
targetHeight: 250,
var options = {
quality : 100,
destinationType : Camera.DestinationType.DATA_URL,
sourceType : Camera.PictureSourceType.CAMERA,
encodingType : Camera.EncodingType.JPEG,
allowEdit : true,
targetWidth: 250,
targetHeight: 250,
correctOrientation: 0,
//popoverOptions : popover
};
当我删除这些参数时它工作正常。任何人都可以指导我这里发生了什么吗?谢谢你的帮助。
答案 0 :(得分:2)
搞定了。问题是我更新了cordova。但相机插件仍旧。所以我需要取消旧的相机插件并重新安装它。