Using Camera in Android


#1

Sorry to be new and asking so many questions, I’m slowly getting things done I think…

Camera this time.

I add the camera control and it allows me to choose a file from the storage on my PC or phone if installed.

When installing to the phone, I am not asked any permissions for using the camera, and I’m guessing this is the reason why I can only choose an existing picture and not use the camera for a new one.

I’m reading as much as I can in the document, and have added a few things to the config poperties for PhoneGap found here: https://wiki.nsbasic.com/Using_the_PhoneGap_API

But again, I’m banging my head against a brick wall.

So far I’ve added to the config.xml file:

<plugin name="cordova-plugin-barcodescanner" source="npm" />

and

<gap:plugin name="cordova-plugin-camera" source="npm" >
<variable name="CAMERA_USAGE_DESCRIPTION" value="{id} camera use" />
<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="{id} photo use" />
</gap:plugin>

<gap:plugin name="cordova-plugin-geolocation" source="npm" >
<variable name="GEOLOCATION_USAGE_DESCRIPTION" value="{id} Location use." />
</gap:plugin>

Is there an actual detailed step by step tutorial on getting the camera working on both an Android and iOS device that I can study? I can’t find anything at the moment.

Thanks