You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Marc Syp <ma...@gmail.com> on 2014/06/24 19:51:43 UTC

Major Issue: Application often restarts when using Camera and Media Capture plugins.

Hi all,

Can someone tell me if this is an issue that Cordova can address?  It
appears that there is a common failure that happens when Cordova apps are
put in the background to use the Camera or Media Capture plugins... the
Android activity service appears to look for memory to free up and kills
the Cordova activity, so that when the user completes the capture task the
app RESTARTS.  See SO thread here:

http://stackoverflow.com/questions/8368091/phonegap-camera-restarts-the-application/9524643#

This is a total UX fail and would very likely prevent me from releasing my
Cordova app.  People don't take kindly to their photos getting lost.  I am
using Cordova 3.3 and a somewhat older version of the Capture plugin as an
upgrade a month ago caused breaking changes and I rolled back.  Anyway, it
appears that at some point someone created a custom plugin called
foreground camera that never allowed the app to go into onStop state, which
fixed the problem:

https://code.google.com/p/foreground-camera-plugin/

Unfortunately, this custom plugin is horribly out of date (Cordova 2.4).
 Is it possible for the native Cordova plugins to be modified to prevent
this terrible restart behavior?  Are there any plans to doing so?  Or is it
only possible by creating a completely new camera plug-in, from scratch,
one that doesn't use the native camera application?

Thanks for your time.

Marc

Re: Major Issue: Application often restarts when using Camera and Media Capture plugins.

Posted by Joe Bowser <bo...@gmail.com>.
There is probably nothing we can do about this. If your image is too large,
or if you don't allow apps to run in the background, this will happen.  We
did have an issue but we closed it once it was mitigated.  It was open for
over 2 years at that point.

We currently don't have plans to create our own camera for the plugin.
On Jun 27, 2014 12:07 PM, "Shazron" <sh...@gmail.com> wrote:

> Not sure. It's best to file an issue at:
> http://issues.apache.org/jira/browse/CB
>
> ... so it can be tracked and evaluated by the devs, and you can be
> notified.
>
> Sign up here:
> https://issues.apache.org/jira/secure/Signup!default.jspa
>
> Thanks!
>
>
>
>
> On Tue, Jun 24, 2014 at 10:51 AM, Marc Syp <ma...@gmail.com> wrote:
> > Hi all,
> >
> > Can someone tell me if this is an issue that Cordova can address?  It
> > appears that there is a common failure that happens when Cordova apps are
> > put in the background to use the Camera or Media Capture plugins... the
> > Android activity service appears to look for memory to free up and kills
> > the Cordova activity, so that when the user completes the capture task
> the
> > app RESTARTS.  See SO thread here:
> >
> >
> http://stackoverflow.com/questions/8368091/phonegap-camera-restarts-the-application/9524643#
> >
> > This is a total UX fail and would very likely prevent me from releasing
> my
> > Cordova app.  People don't take kindly to their photos getting lost.  I
> am
> > using Cordova 3.3 and a somewhat older version of the Capture plugin as
> an
> > upgrade a month ago caused breaking changes and I rolled back.  Anyway,
> it
> > appears that at some point someone created a custom plugin called
> > foreground camera that never allowed the app to go into onStop state,
> which
> > fixed the problem:
> >
> > https://code.google.com/p/foreground-camera-plugin/
> >
> > Unfortunately, this custom plugin is horribly out of date (Cordova 2.4).
> >  Is it possible for the native Cordova plugins to be modified to prevent
> > this terrible restart behavior?  Are there any plans to doing so?  Or is
> it
> > only possible by creating a completely new camera plug-in, from scratch,
> > one that doesn't use the native camera application?
> >
> > Thanks for your time.
> >
> > Marc
>

Re: Major Issue: Application often restarts when using Camera and Media Capture plugins.

Posted by Shazron <sh...@gmail.com>.
Not sure. It's best to file an issue at:
http://issues.apache.org/jira/browse/CB

... so it can be tracked and evaluated by the devs, and you can be notified.

Sign up here:
https://issues.apache.org/jira/secure/Signup!default.jspa

Thanks!




On Tue, Jun 24, 2014 at 10:51 AM, Marc Syp <ma...@gmail.com> wrote:
> Hi all,
>
> Can someone tell me if this is an issue that Cordova can address?  It
> appears that there is a common failure that happens when Cordova apps are
> put in the background to use the Camera or Media Capture plugins... the
> Android activity service appears to look for memory to free up and kills
> the Cordova activity, so that when the user completes the capture task the
> app RESTARTS.  See SO thread here:
>
> http://stackoverflow.com/questions/8368091/phonegap-camera-restarts-the-application/9524643#
>
> This is a total UX fail and would very likely prevent me from releasing my
> Cordova app.  People don't take kindly to their photos getting lost.  I am
> using Cordova 3.3 and a somewhat older version of the Capture plugin as an
> upgrade a month ago caused breaking changes and I rolled back.  Anyway, it
> appears that at some point someone created a custom plugin called
> foreground camera that never allowed the app to go into onStop state, which
> fixed the problem:
>
> https://code.google.com/p/foreground-camera-plugin/
>
> Unfortunately, this custom plugin is horribly out of date (Cordova 2.4).
>  Is it possible for the native Cordova plugins to be modified to prevent
> this terrible restart behavior?  Are there any plans to doing so?  Or is it
> only possible by creating a completely new camera plug-in, from scratch,
> one that doesn't use the native camera application?
>
> Thanks for your time.
>
> Marc