incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Bowser (Commented) (JIRA)" <>
Subject [jira] [Commented] (CB-220) OutOfMemory errors using Camera API on Android Nexus S
Date Sat, 04 Feb 2012 00:41:53 GMT


Joe Bowser commented on CB-220:

I managed to recreate the bug, but this is unfortunately a known issue.  Here's the background
on it:

A 5MP image is far too large to be passed through an intent in most cases. Even then, since
all manipulations require making copies of this image in memory, making it worse, this will
almost always cause the DATA_URL method to fail. A work-around is to use FILE_URL:

{, onFail, { quality: 90, destinationType: Camera.DestinationType.FILE_URI,
sourceType : Camera.PictureSourceType.CAMERA });}

This will work on the Nexus S, and is what we have included in the sample.

> OutOfMemory errors using Camera API on Android Nexus S
> ------------------------------------------------------
>                 Key: CB-220
>                 URL:
>             Project: Apache Callback
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 1.2.0
>         Environment: Android Nexus S
>            Reporter: Pamela Fox
>            Assignee: Joe Bowser
> I use the Camera API to let users take photos from the PhoneGap app.
> I first experienced the error reported in
but after applying the patch, I no longer experienced the error. However, I still experienced
two other OutOfMemory errors:
> "bitmap size exceeds VM budget" (full trace:
> And one during com.phonegap.api.PluginResult.toSuccessCallbackString (full trace:
> I seem to avoid these errors by requesting a low quality (20) and low width/height (400/400)..but
I imagine that workaround won't work for all people using the Camera API, and I don't feel
great on relying on that as a solution.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message