[ 
https://issues.apache.org/jira/browse/CB-10721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15183535#comment-15183535
 ] 

Gregor commented on CB-10721:
-----------------------------

Hi [~nikhilkh] and [~riknoll] and thank you both for your replies.

First, I've noticed that happening only on my Galaxy S6 device (which was also 
updated to 6.0.1 and the issue still appears). I've tested it on Nexus 5x, 
Nexus 5 and Nexus 4 also and there wasn't any delay whatsoever. Here's my JS 
code:

{code:javascript}
 takePhoto() {
    if (!window['cordova']) {
      console.log('This function will only work on device!');
      return;
    }

    let cameraOptions = {
      sourceType: navigator['camera'].PictureSourceType.CAMERA,
      destinationType: navigator['camera'].DestinationType.FILE_URI, // DATA_URL
      encodingType: 1, // 0: jpeg, 1: png
      saveToPhotoAlbum: true,
      correctOrientation: true

    };

    new Promise((resolve, reject) => {
      navigator['camera'].getPicture(
        (success) => {
          console.log('success', success);
          resolve(success);
        },
        (error) => {
          console.log('error', error);
          reject(error);
        }, cameraOptions);
    })
      // save the image we got with photo camera
      .then((image) => {
        // adding file to array
        this.data.images.push(image);
        this.data.media_format = 'img';
      });
  }
{code}

I'd love to debug anything for you or make some kind of extra debugging (If I 
would know how) and post extras here If you'd like so.

Thank you for replying and helping,

Regards 

> getPicture takes at least 20 seconds to get me back to my app
> -------------------------------------------------------------
>
>                 Key: CB-10721
>                 URL: https://issues.apache.org/jira/browse/CB-10721
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>    Affects Versions: 2.1.0
>         Environment: Android 5.1.0
>            Reporter: Gregor
>              Labels: Android, triaged
>
> Using Cordova Camera plugin with function getPicture() takes a picture 
> without any problem (when source is CAMERA). Default camera app opens, I take 
> a photo, confirm it, then a black screen shows for around 20 seconds before 
> I'm thrown back to my app with success callback.
> Picking photo from library doesn't have this issue.
> Samsung Galaxy S6 with Android 5.1.0.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to