You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Richard B Knoll (JIRA)" <ji...@apache.org> on 2016/02/22 23:54:18 UTC

[jira] [Commented] (CB-10246) camera.getPicture fails with “Camera cancelled”

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

Richard B Knoll commented on CB-10246:
--------------------------------------

I can't reproduce this on an Android 6.0.0 device and since there has been no response, I am closing this issue. If you are still experiencing it, please reopen it and let me know!

> camera.getPicture fails with “Camera cancelled”
> -----------------------------------------------
>
>                 Key: CB-10246
>                 URL: https://issues.apache.org/jira/browse/CB-10246
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>    Affects Versions: 3.5.0
>            Reporter: Koen Jans
>              Labels: Android, triaged, wfc
>
> Hi All,
> I'm developing a cordova app (cli-5.2.0) in which pictures are taken using the cordova camera plugin
> (cordova-plugin-camera, version 1.2.0).
> {noformat}
> var camera = navigator.camera; 
> var cameraOptions = {  
>   destinationType: Camera.DestinationType.DATA_URL 
> };
> camera.getPicture(function(result) {
>       alert('success');
>     }, function(error) {
>        alert('fail ' + error);
>     }, cameraOptions);
> {noformat}
> This code works fine.. ..most of the time. 
> On a particular slow android 4.4.4 device, this only works fine like 9 out of 10 times. 
> In like 1 out of 10, the call fails saying 'Camera cancelled' (although it was not cancelled with the back button or something). 
> In that case, the failure callback 'Camera cancelled' is fired, and right after that, the Camera UI is shown nevertheless.
> (if a picture is taken then, the success callback is not called). 
> It's hard to tell when this happens, but it looks like it happens more often if the device is app is more busy. 
> The log files do not show much more detail, except for things like:
> bq.Attempted to send a second callback for ID: Camera1337050609
> However, these logs are also written if the call succeeds.
> Any hints or help is much appreciated.
> Thanks for your time,
> Koen



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

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