cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai Schlamp <schl...@gmx.de>
Subject Re: CordovaPlugin lifecycle differs from Activity lifecycle
Date Thu, 27 Aug 2015 22:13:57 GMT
https://issues.apache.org/jira/browse/CB-9570

2015-08-25 3:04 GMT+02:00 Joe Bowser <bowserj@gmail.com>:

> They used to be called on the Activity, but I think this was lost on a
> recent refactor and nobody reported it until now.  This is odd, because a
> lot of things do rely on that code working, like garbage collection on
> plugins.  I'd still file an issue to get more people to look at it.
>
> On Mon, Aug 24, 2015 at 6:01 PM Andrew Grieve <agrieve@chromium.org>
> wrote:
>
> > I noted this as weird as well, but it's just always been this way in
> > Cordova. I think it came from the fact that on iOS you only get a resume
> > after a pause.
> >
> > You can always use
> >
> >
> http://developer.android.com/reference/android/app/Application.html#registerActivityLifecycleCallbacks%28android.app.Application.ActivityLifecycleCallbacks%29
> > to listen to the callbacks directly though.
> >
> > On Mon, Aug 24, 2015 at 1:27 PM, Joe Bowser <bowserj@gmail.com> wrote:
> >
> > > Sorry, I was sick for a couple of days.
> > >
> > > That sounds like a bug.  onStart and onResume should be called on the
> > > plugins, and this most likely got broken when the last refactor.  Do
> you
> > > have an issue open in JIRA for this?
> > >
> > > On Sun, Aug 23, 2015 at 1:35 PM Kai Schlamp <schlamp@gmx.de> wrote:
> > >
> > > > The CordovaPlugin has the same onStart and onResume callback methods
> as
> > > > Androids Activity class. Unfortunately those differ from the Activity
> > > > Lifecycle (see
> > > >
> > > >
> > >
> >
> http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle
> > > > ).
> > > > The onStart and onResume methods of CordovaPlugin are not called when
> > the
> > > > app starts for the first time (in contrast to the appropriate
> Activitiy
> > > > methods).
> > > > Wouldn't it make sense to have the same lifecycle as an Activity
> (which
> > > is
> > > > quite right in my opinion)?
> > > >
> > > > Best regards,
> > > > Kai
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message