cordova-issues mailing list archives

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


Nicolas Leclerc commented on CB-10128:

Well, i was a bit mistaken but id does boil down to this:
        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"];

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message