Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 2 of 2 total |
Phonegap error camera |
Thu, Jun 7 2018 8:57 AM | Permanent Link |
Pasquale Web Pos srl | I'm working with phonegap to manage a camera. On the OnClick event does not open the camera but I see the error "Cannot read property 'getPicture' of undefined".
It depends on the config.xml? |
Thu, Jun 7 2018 9:33 AM | Permanent Link |
Chris Holland SEC Solutions Ltd. Team Elevate | You need something like this in the config.xml file to access the camera
or photos via Cordova/Phonegap <plugin name="cordova-plugin-camera" source="npm">    <variable name="CAMERA_USAGE_DESCRIPTION" value="App would like to access the camera." />    <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="App would like to access the library." />    <variable name="MICROPHONE_USAGE_DESCRIPTION" value="App would like to access the microphone." /> </plugin> and something like this in an external javascript file: function capturePhoto(onPhotoSuccess,onPhotoFail) {  navigator.camera.getPicture(onPhotoSuccess, onPhotoFail, {             saveToPhotoAlbum: true,             quality : 50,              allowEdit : false,              destinationType : Camera.DestinationType.FILE_URL,              sourceType : Camera.PictureSourceType.CAMERA,              encodingType: Camera.EncodingType.JPEG,             saveToPhotoAlbum: true          }); } On 07/06/2018 13:57, Pasquale wrote: > I'm working with phonegap to manage a camera. On the OnClick event does not open the camera but I see the error "Cannot read property 'getPicture' of undefined". > It depends on the config.xml? > |
This web page was last updated on Wednesday, April 17, 2024 at 10:35 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |