cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dinger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-2165) The "saveToPhotoAlbum" option for Camera.getPicture does not work with Cordova 2.2/Android
Date Wed, 16 Jan 2013 22:00:15 GMT

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

Thomas Dinger commented on CB-2165:
-----------------------------------

Thanks Simon.

I was able to add some JS code to convert "true" to true. The reason it was "true" to begin
with is because the camera options JSON is created using an XML-to-JSON conversion, and apparently
that logic defaults to specifying all of the JSON values as strings. It is worth noting that
the values for quality, targetWidth, and targetHeight are also strings, not numbers. But they
work as expected because of the type conversion logic in Cordova's getPicture() function.

Would it be possible to add similar type conversion logic in getPicture(), to handle values
that are expected to be boolean, but are passed in as stings?
                
> 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

Mime
View raw message