![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 2 of 2 total |
![]() |
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. ![]() | 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 Saturday, June 3, 2023 at 10:17 AM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |