You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Daniel Morgan (JIRA)" <ji...@apache.org> on 2013/08/05 22:16:47 UTC

[jira] [Commented] (CB-4320) IOS: Why does getPicture, with jpeg format, from Camera needs Location Services be enabled?

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

Daniel Morgan commented on CB-4320:
-----------------------------------

Commenting here rather than CB-4003 because my issue is more relevant to this issue (I only care that getPicture needs Location Services enabled, not about prompting the user about location services). This causes the application I'm working on look broken. If the user has location services off and tries to take a photo in my app, the success/error callbacks never gets called and my app hangs. 

I fixed this by removing the return statement on line 321 of CDVCamera.m ("return;"). Through testing this makes taking photos with location services on/off work fine in my app, but I would like to have a better solution if possible. 
                
> IOS: Why does getPicture, with jpeg format, from Camera needs Location Services be enabled?
> -------------------------------------------------------------------------------------------
>
>                 Key: CB-4320
>                 URL: https://issues.apache.org/jira/browse/CB-4320
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>    Affects Versions: 2.9.0
>            Reporter: Stephan Wezel
>            Assignee: Steve Gill
>            Priority: Critical
>         Attachments: config.xml
>
>
> With cordova 2.8 and 2.9 the Location Services must be enabled when a picture (Image format JPEG)from the camera should be received.
> If the Location Services isn't enabled navigator.camera.getPicture doesn't call either the success callback nor the error callback.
> In Cordova 2.7 the Location Services weren't needed to be active.
> I could change the image format to PNG but it creates way bigger image files(8.5 MB instead of 1.2 MB on JPEG) and generates following error: 
> "<Error>: ImageIO: PNG invalid PNG file: iDOT doesn't point to valid IDAT chunk"
> It shouldn't break getting a picture from camera when the location services are disabled.
> i call getPicture with following options:
> quality: 49,
> encodingType: Camera.EncodingType.JPEG,
> destinationType: Camera.DestinationType.FILE_URI,
> correctOrientation: true,
> sourceType: Camera.PictureSourceType.CAMERA

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