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

ASF GitHub Bot commented on CB-10270:
-------------------------------------

Github user riknoll commented on the pull request:

    
https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-181996971
  
    Alright, the real solution to this problem in my opinion is to get rid of 
the `getRealPath` function altogether. Not all URIs have real paths and there 
are always going to be some cases that fail. The "Android" way of handling this 
is to use ContentResolvers in order to get input streams and to stop trying to 
force everything into being a file on the device. Unfortunately, that is a 
major rewrite of this plugin. The sheer number of JIRA issues and open PRs that 
deal with it should be justification enough, though.
    
    As for this PR, it does patch over one issue and so I'm inclined to leave 
it open as is. The other issue you are seeing is related but requires a very 
different fix. I believe there is already a JIRA open tracking it but I can't 
recall the issue ID off the top of my head.


> camera.getPicture() returns an empty string
> -------------------------------------------
>
>                 Key: CB-10270
>                 URL: https://issues.apache.org/jira/browse/CB-10270
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>    Affects Versions: 2.1.0
>         Environment: Android 4.4.2 (api 19)
>            Reporter: Alexander Sorokin
>            Assignee: Richard B Knoll
>            Priority: Critical
>              Labels: android, reproduced, triaged
>         Attachments: mobilespec-camera.7z
>
>
> Code sample to reproduce:
> {code}
> navigator.camera.getPicture(onSuccess, onFail, { 
>     destinationType: Camera.DestinationType.FILE_URI,
>     sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
>     correctOrientation: true
> });
> {code}
> {{onSuccess}} is called with an empty string as an argument.
> if {{correctOrientation}} is {{false}}, everything works as expected.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to