【发布时间】:2015-03-25 04:30:17
【问题描述】:
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
};
当我删除这些参数时,它工作正常。谁能指导我这里发生了什么?感谢您的帮助。
【问题讨论】:
-
你得到了什么错误信息?
-
即使没有调用fail方法也没有错误信息。解决了。