You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/04/04 11:11:40 UTC

[GitHub] [cordova-plugin-camera] djimmo opened a new issue #441: getPicture() sourceType Camera open Photo Folder AND Camera

djimmo opened a new issue #441: getPicture() sourceType Camera open Photo Folder AND Camera
URL: https://github.com/apache/cordova-plugin-camera/issues/441
 
 
   # Bug Report
   I am building an application that needs to take a photo.
   
   ## Problem
   Upon pressing the button to open the camera, instead 
   
   1. The photo folder is opened where the user needs to select a photo
   2. After the photo is selected the camera opens and the user can take a picture
   3. The photo taken with the camera is finally shown
   
   ### What is expected to happen?
   When pressing the button only the camera should open.
   
   ### What does actually happen?
   First the photo folder opens, where the user needs to select a photo. Then the camera opens where the user can take a photo.
   
   ## Information
   I have tried the code on a tablet running Android 4.4.2, and the application works as expected. 
   
   ### Command or Code
   The code used to open the camera is as follows:
   `var app = {
   
   onDeviceReady: function() {
       document.querySelector("#myFile").addEventListener("click", app.callCamera);
   },
   
   callCamera: function () {
       app.imgOptions = {
               quality: 85,
               destinationType: Camera.DestinationType.DATA_URL,            
               sourceType: Camera.PictureSourceType.CAMERA,
               encodingType: Camera.EncodingType.JPEG,
               mediaType: Camera.MediaType.PICTURE,
               allowEdit: false,
               correctOrientation: true
        };
           
       navigator.camera.getPicture( app.imgSuccess, app.imgFail, app.imgOptions );
    }
   }`
   
   ### Environment, Platform, Device
   The bug happened on Moto G5 running Android 8.1.0 and Moto G6 running Android 8.0.0
   
   ### Version information
   Cordova v9.0.0
   Android Platform v8.0.0
   cordova-plugin-camera v4.0.3 "Camera"
   cordova-plugin-whitelist v1.3.3 "Whitelist"
   
   ## Checklist
   - [x] I searched for existing GitHub issues
       |____> I also commented on an existing issue, but my new bug report contains more information
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org