[
https://issues.apache.org/jira/browse/CB-10270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15135851#comment-15135851
]
ASF GitHub Bot commented on CB-10270:
-------------------------------------
Github user shaoner commented on the pull request:
https://github.com/apache/cordova-plugin-camera/pull/160#issuecomment-180798266
@riknoll, somehow an exception is triggered by this line for some uri:
```java
try {
String wholeID = DocumentsContract.getDocumentId(uri);
// ...
} catch(Exception e) {
filePath = "";
}
```
The exception looks actually like:
> java.lang.IllegalArgumentException: Invalid URI:
content://media/external/images/media/5230
> 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]