cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koen Jans (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-10246) camera.getPicture fails with “Camera cancelled”
Date Tue, 22 Dec 2015 20:26:46 GMT

     [ https://issues.apache.org/jira/browse/CB-10246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Koen Jans updated CB-10246:
---------------------------
    Description: 
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).



{ { var camera = navigator.camera; } }
{ { var cameraOptions = {  } }
{ {  destinationType: Camera.DestinationType.DATA_URL } }
{ {  }; } }

bq.    camera.getPicture(function(result) {
bq.        alert('success');
bq.      }, function(error) {
bq.        alert('fail ' + error);
bq.      }, cameraOptions);





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. <br/>
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


  was:
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).



bq.    var camera = navigator.camera;
bq.    var cameraOptions = { 
bq.      destinationType: Camera.DestinationType.DATA_URL
bq.    };

bq.    camera.getPicture(function(result) {
bq.        alert('success');
bq.      }, function(error) {
bq.        alert('fail ' + error);
bq.      }, cameraOptions);





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. <br/>
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



> 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: Android
>    Affects Versions: 3.5.0
>            Reporter: Koen Jans
>
> 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).
> { { var camera = navigator.camera; } }
> { { var cameraOptions = {  } }
> { {  destinationType: Camera.DestinationType.DATA_URL } }
> { {  }; } }
> bq.    camera.getPicture(function(result) {
> bq.        alert('success');
> bq.      }, function(error) {
> bq.        alert('fail ' + error);
> bq.      }, cameraOptions);
> 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. <br/>
> 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


Mime
View raw message