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

Max Woghiren edited comment on CB-2213 at 2/13/13 7:46 PM:
-----------------------------------------------------------

Here's the situation:

Picking a file from Picasa works on my Galaxy S2 running Android 4.0.3.  Doing 
so copies the image locally and works with that.

Picking a file from Picasa does not work on Andrew's Nexus 4 running Android 
4.2.2.  The Intent passed to CameraLauncher.onActivityResult contains a "NOT 
CACHED" URI and appears to be unusable.

However, when the Intent is being created in CameraLauncher.getImage, it is 
given an "image/\*" type.  Changing this to "\*/\*" provides a content URI, 
which is nice, but it's of the form 
"content://com.google.android.gallery3d.provider/picasa/item/...", which isn't 
usable in the usual way; FileUtils.getRealPathFromURI returns null.  This case 
probably just needs to be handled using ContentResolver.openInputStream, which 
would require some FileUtils refactoring.

One more note: Picasa photos don't appear to work with the existing FILE_URI 
DestinationType or <input type="file" /> picker, so this issue probably belongs 
in its own bug.
                
      was (Author: max.woghiren):
    Here's the situation:

Picking a file from Picasa works on my Galaxy S2 running Android 4.0.3.  Doing 
so copies the image locally and works with that.

Picking a file from Picasa does not work on Andrew's Nexus 4 running Android 
4.2.2.  The Intent passed to CameraLauncher.onActivityResult contains a "NOT 
CACHED" URI and appears to be unusable.

However, when the Intent is being created in CameraLauncher.getImage, it is 
given an "image/*" type.  Changing this to "*/*" provides a content URI, which 
is nice, but it's of the form 
"content://com.google.android.gallery3d.provider/picasa/item/...", which isn't 
usable in the usual way; FileUtils.getRealPathFromURI returns null.  This case 
probably just needs to be handled using ContentResolver.openInputStream, which 
would require some FileUtils refactoring.

One more note: Picasa photos don't appear to work with the existing FILE_URI 
DestinationType or <input type="file" /> picker, so this issue probably belongs 
in its own bug.
                  
> Add support for native URIs
> ---------------------------
>
>                 Key: CB-2213
>                 URL: https://issues.apache.org/jira/browse/CB-2213
>             Project: Apache Cordova
>          Issue Type: New Feature
>          Components: Android, CordovaJS, iOS
>            Reporter: Max Woghiren
>            Assignee: Max Woghiren
>            Priority: Minor
>
> It would be useful to add the ability to access files directly from a 
> device's photo/video library.  To do this, support for native URIs is 
> necessary—for instance, iOS's assets-library:// scheme.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to