thedeephakani commented on issue #411:
URL: 
https://github.com/apache/cordova-plugin-camera/issues/411#issuecomment-704061810


   I am trying to use cordova-plugin-camera using typescript.
   but when I try to call getPicture. it will open the gallery. but before 
that, it's going to fail method and show that no image selected.
   
   cameraSuccess = (img: string) => {
           console.log(img);
       };
   
       onCameraFail = (message: string) => {
           console.log("Failed because: " + message);
       };
   
       onCameraClick = () => {
           const options: CameraOptions = {
               sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
               destinationType: Camera.DestinationType.DATA_URL,
           };
   
           navigator.camera.getPicture(this.cameraSuccess, this.onCameraFail, 
options);
       };
      


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to