PhoneGap相机API不工作的iOS [英] PhoneGap Camera API not working for iOS

查看:183
本文介绍了PhoneGap相机API不工作的iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

PhoneGap相机API未从我的控制器调用。

The PhoneGap camera API is not being called from my controller.

代码是:

navigator.camera.getPicture(this.onPhotoDataSuccess(), this.onFail(),
                                  { quality: 80,destinationType: Camera.DestinationType.DATA_URL,
                                  sourceType: Camera.PictureSourceType.PHOTOLIBRARY});

但是没有调用navigator.camera.getPicture
任何人都能指出我错过了什么?

But no called being made to the navigator.camera.getPicture() function. Can anyone point out what am i missing?

推荐答案

尝试:

navigator.camera.getPicture(this.onPhotoDataSuccess, this.onFail,
                              { quality: 80,destinationType: Camera.DestinationType.DATA_URL,
                              sourceType: Camera.PictureSourceType.PHOTOLIBRARY});

您还可以尝试/看看PhoneGap示例应用程序,包括拍摄照片和显示

You could also try/have a look at the PhoneGap sample app that includes taking a picture and showing it on the local html page.

希望这有助于!

这篇关于PhoneGap相机API不工作的iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆