You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Kerri Shotts (JIRA)" <ji...@apache.org> on 2016/08/18 16:27:20 UTC
[jira] [Commented] (CB-11716) Two intersecting calls to
camera.getPicture() fail
[ https://issues.apache.org/jira/browse/CB-11716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15426745#comment-15426745 ]
Kerri Shotts commented on CB-11716:
-----------------------------------
Is there a reason why you're not waiting for the first innovation to complete?
Why not write this instead:
{code:javascript}
navigator.camera.getPicture(function () {
console.log('First getPicture() win!');
setTimeout(function() {
navigator.camera.getPicture(function () {
console.log('Second getPicture() win!');
}, function () {
console.log('Second getPicture() error!');
}, options);
}, 0);
}, function () {
console.log('First getPicture() error!');
}, options);
{code}
> Two intersecting calls to camera.getPicture() fail
> --------------------------------------------------
>
> Key: CB-11716
> URL: https://issues.apache.org/jira/browse/CB-11716
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Camera
> Affects Versions: Master
> Environment: Android 4.4
> Reporter: Alexander Sorokin
> Priority: Minor
> Labels: found-by-ci, triaged
>
> In the following example, two separate gallery apps open and upon selection, only the second error callback is called:
> (options.sourceType is PHOTOLIBRARY)
> {code}
> navigator.camera.getPicture(function () {
> console.log('First getPicture() win!');
> }, function () {
> console.log('First getPicture() error!');
> }, options);
> setTimeout(function () {
> navigator.camera.getPicture(function () {
> console.log('Second getPicture() win!');
> }, function () {
> console.log('Second getPicture() error!');
> }, options);
> }, 1000);
> {code}
--
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