You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Joe Bowser <bo...@gmail.com> on 2016/10/03 23:23:29 UTC

[Android] onPause and onResume in the background on WebViews

Hey

So, this bug came in and it's an important one:
https://issues.apache.org/jira/browse/CB-11935

I've already accepted the fix for KeepRunning = false, but apps that start
in the background that have their JS running, and other apps probably need
to have their status managed.  I want to run onPause and onResume on the
webview every time the app pauses and resumes in Cordova, but I'm wondering
if that screws people up.  I know that we're at the eve of a major change,
so I can just break stuff, but it'd be good to get feedback before doing
it.

What do people think? This is a pretty important change.

Joe

Re: [Android] onPause and onResume in the background on WebViews

Posted by Jesse <pu...@gmail.com>.
So if we add PauseOnBackground as a new feature, the default value is
whatever happens now? Meaning no one has to care if they don't care?


@purplecabbage
risingj.com

On Tue, Oct 4, 2016 at 10:47 AM, Joe Bowser <bo...@gmail.com> wrote:

> Yeah, I think we shouldn't break users.  That said, I do think
> PauseOnBackground should be a new feature.  I don't know if it'll land in
> 6.0 though, since I want to get the vote out this week.
>
> On Tue, Oct 4, 2016 at 10:40 AM, Shazron <sh...@gmail.com> wrote:
>
> > We could like you said make a breaking change, but allow a preference to
> be
> > set.
> >
> > We either make the preference backwards compatible (ie KeepRunning =
> true)
> > so existing apps still work the same on Cordova-Android 6, or break
> > backwards compatibility with KeepRunning=false as default.
> >
> > I would prefer to be backwards compatible, and not break users -- I think
> > if they encounter a rejection they can just turn on this preference and
> > re-submit.
> >
> >
> >
> > On Mon, Oct 3, 2016 at 4:23 PM, Joe Bowser <bo...@gmail.com> wrote:
> >
> > > Hey
> > >
> > > So, this bug came in and it's an important one:
> > > https://issues.apache.org/jira/browse/CB-11935
> > >
> > > I've already accepted the fix for KeepRunning = false, but apps that
> > start
> > > in the background that have their JS running, and other apps probably
> > need
> > > to have their status managed.  I want to run onPause and onResume on
> the
> > > webview every time the app pauses and resumes in Cordova, but I'm
> > wondering
> > > if that screws people up.  I know that we're at the eve of a major
> > change,
> > > so I can just break stuff, but it'd be good to get feedback before
> doing
> > > it.
> > >
> > > What do people think? This is a pretty important change.
> > >
> > > Joe
> > >
> >
>

Re: [Android] onPause and onResume in the background on WebViews

Posted by Joe Bowser <bo...@gmail.com>.
Yeah, I think we shouldn't break users.  That said, I do think
PauseOnBackground should be a new feature.  I don't know if it'll land in
6.0 though, since I want to get the vote out this week.

On Tue, Oct 4, 2016 at 10:40 AM, Shazron <sh...@gmail.com> wrote:

> We could like you said make a breaking change, but allow a preference to be
> set.
>
> We either make the preference backwards compatible (ie KeepRunning = true)
> so existing apps still work the same on Cordova-Android 6, or break
> backwards compatibility with KeepRunning=false as default.
>
> I would prefer to be backwards compatible, and not break users -- I think
> if they encounter a rejection they can just turn on this preference and
> re-submit.
>
>
>
> On Mon, Oct 3, 2016 at 4:23 PM, Joe Bowser <bo...@gmail.com> wrote:
>
> > Hey
> >
> > So, this bug came in and it's an important one:
> > https://issues.apache.org/jira/browse/CB-11935
> >
> > I've already accepted the fix for KeepRunning = false, but apps that
> start
> > in the background that have their JS running, and other apps probably
> need
> > to have their status managed.  I want to run onPause and onResume on the
> > webview every time the app pauses and resumes in Cordova, but I'm
> wondering
> > if that screws people up.  I know that we're at the eve of a major
> change,
> > so I can just break stuff, but it'd be good to get feedback before doing
> > it.
> >
> > What do people think? This is a pretty important change.
> >
> > Joe
> >
>

Re: [Android] onPause and onResume in the background on WebViews

Posted by Shazron <sh...@gmail.com>.
We could like you said make a breaking change, but allow a preference to be
set.

We either make the preference backwards compatible (ie KeepRunning = true)
so existing apps still work the same on Cordova-Android 6, or break
backwards compatibility with KeepRunning=false as default.

I would prefer to be backwards compatible, and not break users -- I think
if they encounter a rejection they can just turn on this preference and
re-submit.



On Mon, Oct 3, 2016 at 4:23 PM, Joe Bowser <bo...@gmail.com> wrote:

> Hey
>
> So, this bug came in and it's an important one:
> https://issues.apache.org/jira/browse/CB-11935
>
> I've already accepted the fix for KeepRunning = false, but apps that start
> in the background that have their JS running, and other apps probably need
> to have their status managed.  I want to run onPause and onResume on the
> webview every time the app pauses and resumes in Cordova, but I'm wondering
> if that screws people up.  I know that we're at the eve of a major change,
> so I can just break stuff, but it'd be good to get feedback before doing
> it.
>
> What do people think? This is a pretty important change.
>
> Joe
>

Re: [Android] onPause and onResume in the background on WebViews

Posted by julio cesar sanchez <jc...@gmail.com>.
Yes, I think that will screw a lot of apps that keep running in the
background. Maybe it should be a config.xml preference with default value
not to pause it.

But my real opinion about this issue is that I don't think the videos
should be embedded into the app, people should use inAppBrowser to play
them and inAppBrowser already have an option to pause the videos when the
app pauses. I'm against using iframes to load external content on Cordova
apps, and a youtube video is an iframe.



2016-10-04 1:23 GMT+02:00 Joe Bowser <bo...@gmail.com>:

> Hey
>
> So, this bug came in and it's an important one:
> https://issues.apache.org/jira/browse/CB-11935
>
> I've already accepted the fix for KeepRunning = false, but apps that start
> in the background that have their JS running, and other apps probably need
> to have their status managed.  I want to run onPause and onResume on the
> webview every time the app pauses and resumes in Cordova, but I'm wondering
> if that screws people up.  I know that we're at the eve of a major change,
> so I can just break stuff, but it'd be good to get feedback before doing
> it.
>
> What do people think? This is a pretty important change.
>
> Joe
>