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

Theo Vis commented on CB-10270:
-------------------------------

Confirm Issue, picking a video from internal storage returns empty string.  The 
getRealPath doesn't resolve to a local url and returns '' see 
getRealPathFromURI_API19 - FileHelper

Version: 
- Camera Version : 2.1.0
- Android version : 5.1.1 0 Sony - Z5

A quick and dirty fix is adding the following line to CameraLauncher.java 
See : 
https://github.com/TanaseButcaru/cordova-plugin-camera-unofficial/commit/e032811c1cf2b382f8576d92cb04e41e0193e221

{quote}
        if (this.mediaType != PICTURE) {
+            if (fileLocation.isEmpty()) fileLocation = uri.toString();
            this.callbackContext.success(fileLocation);
        }
{/qutoe}


> 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
>              Labels: android, mustfix, 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: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to