问题
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