cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Leclerc (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-10128) Incorrect error message when user cancels photo capture
Date Thu, 03 Dec 2015 16:19:11 GMT

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

Nicolas Leclerc commented on CB-10128:
--------------------------------------

Well, i was a bit mistaken but id does boil down to this:
{code}
        NSInteger status = [ALAssetsLibrary authorizationStatus];
        if (status == ALAuthorizationStatusAuthorized) {
            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"no
image selected"];
        } else {
            result = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"has
no access to assets"];
        }
{code}

which is supposed to provide an error message when there's no access to library but breaks
the base scenario when user clicks cancel.

> Incorrect error message when user cancels photo capture
> -------------------------------------------------------
>
>                 Key: CB-10128
>                 URL: https://issues.apache.org/jira/browse/CB-10128
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>    Affects Versions: 1.2.0, 2.0.0
>         Environment: cordova 5.3.3, ios platform 3.9.2 
>            Reporter: Nicolas Leclerc
>
> When photo capture screen is open and user clicks {{cancel}} button then plugin sends
{{has no access to assets}} error (ie. camera access not authorized) where it used to be {{no
image selected}}.
> That's problematic because camera auth is incorrectly reported as missing when it is
indeed authorized and also there's no way to tell the user has cancelled the action.
> This used to work fine in v0.3.x.



--
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