incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon MacDonald (JIRA)" <>
Subject [jira] [Commented] (CB-1293) Camera.getPicture crashes when selecting from a Picasa album on Android
Date Wed, 29 Aug 2012 16:52:07 GMT


Simon MacDonald commented on CB-1293:

I just uploaded a fix to the main Android repository. If you request a quality of 100 and
don't modify the width and height of the picture the URI returned in the onSuccess callback
of getPicture will be a "content://" type URI. You can use this URI as the source of an image
tag to show the image. 

However, if you change the quality, width or height the code tries to figure out the real
path to the image. Because the query into the content store fails a null is returned so I
now call the failure callback in this scenario.

I will look around a bit more to see if there is a way to resolve a content:// URI from Picasa,
Gallery3D, OI File Manager, etc. into a real path but it doesn't look too simple.
> Camera.getPicture crashes when selecting from a Picasa album on Android
> -----------------------------------------------------------------------
>                 Key: CB-1293
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.0.0
>         Environment: Crash found with 2.0.0 on Galaxy Nexus running Android 4.0.4
>            Reporter: Brion Vibber
>            Assignee: Simon MacDonald
> When using camera.getPicture with options:
>   destinationType: Camera.DestinationType.FILE_URI,
>   sourceType: Camera.PictureSourceType.PHOTOLIBRARY
> and selecting a photo from a Picasa-synced album, the application crashes immediately
upon trying to return the data.
> Here's our downstream bug with some analysis:
> FileUtils.getRealPathFromURI() cannot read the "_data" column from the content provider
database, so imagePath and bitmap in CameraLauncher.onActivityResult are null. The crash occurs
when trying to run bitmap.recycle().
> I can avoid the crash by adding a guard check for bitmap != null and the content: URI
is usable in the app to load the image, but doesn't appear to work with FileTransfer.

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:

View raw message