[ 
https://issues.apache.org/jira/browse/CB-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Joe Bowser resolved CB-1513.
----------------------------

    Resolution: Won't Fix
      Assignee: Joe Bowser  (was: Simon MacDonald)

OK, once again I get to be the heavy.

We have been working on bringing in the Camera plugin, however we recently 
decided to not have this be a core plugin in Cordova and instead have it as a 
3rd party plugin.  I'll be creating a repository for it soon and putting it on 
this ticket, but we have no plans to explicitly fix this problem in the near 
future in Cordova itself.

http://mail-archives.apache.org/mod_mbox/cordova-dev/201211.mbox/%3CCAOBL_k66_V_P23V3wBE-G=quxd7mq_jdgr-svaysbbid8mu...@mail.gmail.com%3E

If you feel ambitious, you can try the code in this fork and build it yourself:
https://github.com/infil00p/cordova-android/tree/camera

Sorry about this.
                
> Cordova app gets killed by garbage collector when out of memory due to camera
> -----------------------------------------------------------------------------
>
>                 Key: CB-1513
>                 URL: https://issues.apache.org/jira/browse/CB-1513
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android
>    Affects Versions: 2.0.0
>         Environment: All android versions with some memory extensive apps 
> running
>            Reporter: Ruben Vanhoeyveld
>            Assignee: Joe Bowser
>            Priority: Critical
>              Labels: Cordova, EmbeddedCameraApp, app, camera, crash, custom, 
> restart
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> I'm using PhoneGap's navigator.camera.getPicture function to retrieve a photo 
> from the device's camera on Android.
> When I click the button, it does start the camera, but when I click OK on the 
> camera app after taking a photo, it restarts the application.
> I tried to:
> * use different source types.
> * use different destination types.
> * reduce quality.
> Any ideas?
> I know this:
> {quote}This problem isn't actually about Phonegap. It's a common issue on 
> native android apps too.
> It occurs because when the camera is triggered, the android activity goes 
> background (onStop state), waiting for the camera to take the picture. Then 
> the GC comes and kills the activity to free memory before the conclusion of 
> camera action, and when the camera is done your activity has already died. 
> That is why the app is restarted.{quote}
> From: 
> [Stackoverflow|http://stackoverflow.com/questions/8368091/phonegap-camera-restarts-the-application]
> I have also tried this:
> {quote}We submited a Google Code project named Foreground Camera Plugin that 
> fixes the problem of Android Camera restarting Phonegap applications. There 
> is some orientation on how to use it too. Please see: 
> http://code.google.com/p/foreground-camera-plugin/{quote}
> From: 
> [Stackoverflow|http://stackoverflow.com/questions/8368091/phonegap-camera-restarts-the-application]
> But that didn't work for me... The same goes for *EmbeddedCameraApp*. They 
> are all built on older versions of Cordova. I use Cordova *version 2.0.0*
> Conclusion: It seems to me that the only solution is to use a custom made 
> camera that's implemented in the app as a new activity. Like that, the app 
> doesn't go to the background and isn't killed by the garbage collector.
> Can this be made?

--
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