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

Andrew Grieve commented on CB-2165:
-----------------------------------

FYI - I changed this last code last week when trying to shrink our code via 
argscheck:

https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;a=commitdiff;h=b9f5ebd4f6e82cd3e26997aed9065dec268f34a3

I just checked now, and my change doesn't address the case of strings being 
passed in.

The API before allowed booleans or numbers, but with numbers translated 
anything <= 0 to false. Pretty non-standard... I didn't want to change the 
logic in my refactoring though, so that's why there are number comparisons 
there.

I think what we should do here is just use !!param. This is the behaviour 
browser APIs have. This would be the string "false" would be interpreted as 
true, but that's what browsers do.
                
> The "saveToPhotoAlbum" option for Camera.getPicture does not work with 
> Cordova 2.2/Android
> ------------------------------------------------------------------------------------------
>
>                 Key: CB-2165
>                 URL: https://issues.apache.org/jira/browse/CB-2165
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CordovaJS
>    Affects Versions: 2.2.0
>         Environment: Cordova 2.2, Android 2.3.4
>            Reporter: Thomas Dinger
>            Assignee: Simon MacDonald
>            Priority: Minor
>
> The following JS call results in a call to the success function when the 
> picture is taken, but the picture is not added to the photo library.
> 01-08 09:27:53.470: D/CordovaLog(4089): getPicture() {
> 01-08 09:27:53.470: D/CordovaLog(4089):     "targetHeight": "600",
> 01-08 09:27:53.470: D/CordovaLog(4089):     "targetWidth": "600",
> 01-08 09:27:53.470: D/CordovaLog(4089):     "saveToPhotoAlbum": "true",
> 01-08 09:27:53.470: D/CordovaLog(4089):     "quality": "50",
> 01-08 09:27:53.470: D/CordovaLog(4089):     "destinationType": 1,
> 01-08 09:27:53.470: D/CordovaLog(4089):     "mediaType": 0,
> 01-08 09:27:53.470: D/CordovaLog(4089):     "encodingType": 0,
> 01-08 09:27:53.470: D/CordovaLog(4089):     "allowEdit": "false",
> 01-08 09:27:53.470: D/CordovaLog(4089):     "sourceType": 1
> 01-08 09:27:53.470: D/CordovaLog(4089): }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to