-
CameraPreview problem.
about 9 years ago
-
about 9 years ago
<p>For integrating native camera feature in cordova App, you should use "Cordova camera plugin". It provides js callback to invoke native camera functionality.<br> What you need to do is follow these steps:<br> install camera plugin using cli</p> <pre>cordova plugin add cordova-plugin-camera </pre> <p>Add the js code to use camera functionality</p> <pre>function capturePhoto() { navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50, targetWidth:500, targetHeight: 500, allowEdit: true, correctOrientation: true, destinationType: Camera.DestinationType.DATA_URL }); } function onPhotoDataSuccess( imageData ) { var profileImage = document.getElementById( 'chat_image' ); profileImage.style.display = 'block'; profileImage.src = "data:image/jpeg;base64," + imageData; } </pre> <p>For more detail info: <a href="http://findnerd.com/account/#url=/list/view/How-to-Use-Camera-with-PhoneGap/2312/">http://findnerd.com/account/#url=/list/view/How-to-Use-Camera-with-PhoneGap/2312/</a></p> -
-
about 9 years ago
<p>Can you post here your js code of calling camera feature, so that I can find out the solution..</p> -
-
about 9 years ago
On clicking picture its not coming on screen.. its showing white screen ??
Please help Guys
-
3 Answer(s)