PhoneGap Camera API not working for iOS

泪湿孤枕 提交于 2019-12-12 02:14:38

问题


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

The code is :

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

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


回答1:


Try this:

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

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.

Hope this helps!



来源:https://stackoverflow.com/questions/8470977/phonegap-camera-api-not-working-for-ios

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!