cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Theo Vis (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CB-10270) camera.getPicture() returns an empty string
Date Tue, 23 Feb 2016 20:43:18 GMT

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

Theo Vis edited comment on CB-10270 at 2/23/16 8:42 PM:
--------------------------------------------------------

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

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



was (Author: theovis):
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

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


> 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-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message