[
https://issues.apache.org/jira/browse/CB-6249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14602506#comment-14602506
]
Roland Kontson commented on CB-6249:
------------------------------------
On android 4.4+ (haven't tested with 4.0+).
With PictureSourceType.CAMERA I nicely get a file:// URI, which I can then move
and handle nicely - all exif etc metadata remains. And I can read the file with
the file plugin (as base64 - meta still available and size predictably around
1.33 times larger).
Now, with the other album PictureSourceTypes I can get only a content:// URI,
with which I can't do anything - it won't resolve with
resolveLocalFileSystemURL either. Only viable option is to read as base64. The
downside is that the quality parameter affects it as well - filesize and
quality can fluctuate a lot (JPEG re-encoding? lossy compression), also nothing
besides image's data itself remains.
> Camera fails to return an actual FILE_URI it always returns content://
> ----------------------------------------------------------------------
>
> Key: CB-6249
> URL: https://issues.apache.org/jira/browse/CB-6249
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android, Plugin Camera, Plugin File
> Affects Versions: 3.4.0
> Environment: Current Node Version
> v0.10.25
> Current Cordova CLI Version
> 3.4.0-0.1.0
> Android
> Reporter: Ralph S Theart
> Assignee: Joe Bowser
> Labels: camera, file
>
> No matter what I do I can not get a url of file:///... all I get is
> {code}
> content://media/external/images/media/1357
> {code}
> Here is my very simple code....
> {code}
> navigator.camera.getPicture(function(imageURI){
> console.log('GOT IMAGE: '+imageURI);
> window.resolveLocalFileSystemURL(imageURI, function(entry){
> console.log(entry.name + " " +entry.fullPath);
> }, function(e){
> console.log('Some error occured: '+e.code);
> });
> }, onPhotoFail, {
> destinationType: 1,
> sourceType: pictureSource,
> mediaType : Camera.MediaType.ALLMEDIA,
> encodingType: 0,
> allowEdit : false,
> correctOrientation:true,
> saveToPhotoAlbum: false,
> quality: 50
> });
> {code}
> I always get content://... for the returned path from camera and even the
> same thing when I resolve the url. Can you confirm this bug?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]