Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6DB0811FAD for ; Fri, 12 Sep 2014 17:02:57 +0000 (UTC) Received: (qmail 19810 invoked by uid 500); 12 Sep 2014 17:02:57 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 19771 invoked by uid 500); 12 Sep 2014 17:02:57 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 19753 invoked by uid 99); 12 Sep 2014 17:02:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Sep 2014 17:02:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bowserj@gmail.com designates 209.85.220.171 as permitted sender) Received: from [209.85.220.171] (HELO mail-vc0-f171.google.com) (209.85.220.171) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Sep 2014 17:02:52 +0000 Received: by mail-vc0-f171.google.com with SMTP id im17so985676vcb.16 for ; Fri, 12 Sep 2014 10:02:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=JZF2MEonSEtvc4R5UsuZRaB57Y+SKWKxNQi3vdSY6js=; b=dm0Dz4TuP5e7ioXNV7vQD7VnOxityhsAt1IzMP4BEkZo87LPghEkATY1XI2J5FNDuF qlTKEBkanIELo1pnWsJxWFbSH9isAbMN0hdry5SZsgAC0w05pextPmGf7vmeKEfpqH4U InFBDNclrNjWPTkI5HwnnCdl4j6wf/tkHiiQLkYymlFgaavBq/UZXRfYkz94JTmi5aTp R9Zy+vMMCimMwgXf5wU04agUhipdhcXGH4CGuhE/ITolp4OwSxh2Ow07MLpcZtWCy+qI t7n5OqqUT6OwLN7zK9gA8ypMwCEQwGydyRFLBxvQBzoRuylcL2B0QXe4/kOPJ2JuytqN ff5w== MIME-Version: 1.0 X-Received: by 10.52.129.200 with SMTP id ny8mr6619551vdb.27.1410541351773; Fri, 12 Sep 2014 10:02:31 -0700 (PDT) Received: by 10.220.99.195 with HTTP; Fri, 12 Sep 2014 10:02:31 -0700 (PDT) In-Reply-To: References: Date: Fri, 12 Sep 2014 10:02:31 -0700 Message-ID: Subject: Re: Android: activityResultKeepRunning From: Joe Bowser To: dev Content-Type: multipart/alternative; boundary=bcaec51dd27f36ad850502e140f3 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec51dd27f36ad850502e140f3 Content-Type: text/plain; charset=UTF-8 After testing this again for sanity, we should probably kill this option. I don't like it (in fact I hate it), but resumeTimers doesn't actually resume the timers on KitKat, and since other browsers may not even support this, we have to add a bunch of buggy Javascript that will be prone to breaking instead of buggy Chromium code that's prone to breaking. I still wish someone other than me actually bothered testing this and showing what they had. On Fri, Sep 12, 2014 at 5:10 AM, Ian Clelland wrote: > The patch that they applied was actually taken from the > Cordova-crosswalk-engine plugin, so in this case, they're keeping up with > us :) > > And yeah, once we get this all sorted out, it should be documented. > > On Fri, Sep 12, 2014 at 1:55 AM, Andrey Kurdumov > wrote: > > > Hi, > > > > I periodically check how Crosswalk engine developed and seen that they > land > > functionality which you are discussing today/yesterday > > https://github.com/crosswalk-project/crosswalk-cordova-android/pull/136 > > > > Maybe there make sense keep compatibility with them too. Or at least if > > timers would be paused, this should be documented. > > Would be good if alternative engines have compatible lifecycle as much as > > possible. > > > > Best regargs, > > Andrey Kurdyumov > > > > > > 2014-09-12 0:58 GMT+06:00 Andrew Grieve : > > > > > I guess I can see the value of providing a safety option for "pause my > > > app in the background", but in general I think it's better practice to > > > not pause forcefully, and instead have apps listen to the "pause" > > > event, and stop battery-draining activity there instead. So... let's > > > keep the option in, and keep it off by default. > > > > > > Joe / Tommy - not sure from your comments as to whether they were > > > directed at the idea of removing the option completely, or to the > > > patch I sent that gets rid of unconditionally pausing timers during > > > startActivityForResult flows. Really can't see why you'd want that, > > > and I think it would just cause subtle bugs. > > > > > > On Wed, Sep 10, 2014 at 8:42 PM, Tommy Williams > > > wrote: > > > > Biiiiig -1 for breaking current background behaviour. > > > > > > > > Or am I misunderstanding? > > > > On 11 Sep 2014 10:34, "Joe Bowser" wrote: > > > > > > > >> Pausing timers means that the JS isn't running in the background at > > all. > > > >> This now means that the Javascript is running constantly, > regardless > > of > > > >> whether it's an event. This means that setInterval is still > running. > > > This > > > >> could break people's applications. > > > >> > > > >> On Wed, Sep 10, 2014 at 5:29 PM, Andrew Grieve < > agrieve@chromium.org> > > > >> wrote: > > > >> > > > >> > Getting off track here a bit. > > > >> > > > > >> > Here's what I'm suggesting with my original email: > > > >> > > > > >> > > > > >> > > > > > > https://github.com/agrieve/cordova-android/compare/apache:4.0.x...no_disable_timers?expand=1 > > > >> > > > > >> > I was further asking if there was any use in ever pausing timers > > (aka, > > > >> > removing the KeepRunning preference). > > > >> > > > > >> > > > > >> > > > > >> > On Wed, Sep 10, 2014 at 4:56 PM, Brian LeRoux wrote: > > > >> > > I consider 4 a release branch. Merge in tested green lit code to > > > your > > > >> > > hearts desire but 4.0 is definitely not a feature. It should be > > > always > > > >> > in a > > > >> > > releasable state. > > > >> > > On Sep 10, 2014 1:53 PM, "Michal Mocny" > > > wrote: > > > >> > > > > > >> > >> Question is, do you consider the fact that bugs are introduced > & > > > >> > discovered > > > >> > >> (possibly with pain) a sign that the system is broken, or a > sign > > > that > > > >> > the > > > >> > >> system is working? > > > >> > >> > > > >> > >> I sense that Andrew worries that if work has to land on a > feature > > > >> > branch of > > > >> > >> this feature branch, it won't get eyeballs. > > > >> > >> > > > >> > >> I sense that Joe worries that if we land everything/anything in > > > >> > Android-4.0 > > > >> > >> it will become unstable, as mistakes are prone to happen (see > > i.e. > > > >> > recent > > > >> > >> issue with black background). > > > >> > >> > > > >> > >> Personally, I prefer eyeballs and instability to delayed > > discovery > > > >> and a > > > >> > >> sense of stability, especially for a feature branch like > > > Android-4.0. > > > >> > >> There are workarounds for demos (i.e. create your own branch > off > > > of a > > > >> > >> known working version), but its not as easy to solve the > eyeball > > > >> > problem. > > > >> > >> > > > >> > >> -Michal > > > >> > >> > > > >> > >> On Wed, Sep 10, 2014 at 3:50 PM, Joe Bowser > > > > >> wrote: > > > >> > >> > > > >> > >> > I think this needs to be thought through more, and I'm > > extremely > > > >> wary > > > >> > >> when > > > >> > >> > you say this is a single commit, especially based on the last > > > couple > > > >> > of > > > >> > >> > months and how long it took 3.6 to go through. Given that we > > > have > > > >> > people > > > >> > >> > travelling halfway across the planet who intend to show > people > > > their > > > >> > work > > > >> > >> > in less than two weeks, I would definitely like it if you > were > > to > > > >> put > > > >> > >> this > > > >> > >> > in your own branch for testing. > > > >> > >> > > > > >> > >> > On Wed, Sep 10, 2014 at 12:41 PM, Andrew Grieve < > > > >> agrieve@chromium.org > > > >> > > > > > >> > >> > wrote: > > > >> > >> > > > > >> > >> > > I don't think there'd be much value in that. It'll be a > > single > > > >> > commit > > > >> > >> > > that almost entirely just deletes lines. > > > >> > >> > > > > > >> > >> > > What do you think about the never auto-pausing on > > > backgrounding? > > > >> or > > > >> > >> > > about auto-pausing when intent sending? > > > >> > >> > > > > > >> > >> > > On Wed, Sep 10, 2014 at 12:32 PM, Joe Bowser < > > > bowserj@gmail.com> > > > >> > >> wrote: > > > >> > >> > > > Can you put this on its own branch before it lands in > > 4.0.x? > > > >> > That'd > > > >> > >> be > > > >> > >> > > > awesome! > > > >> > >> > > > > > > >> > >> > > > On Tue, Sep 9, 2014 at 5:32 PM, Andrew Grieve < > > > >> > agrieve@chromium.org> > > > >> > >> > > wrote: > > > >> > >> > > >> > > > >> > >> > > >> For cordova-android 4.0, I'd like to go as far as just > > > deleting > > > >> > the > > > >> > >> > > >> "KeepRunning" . > > > >> > >> > > >> > > > >> > >> > > >> Apps get a "pause" event when they are backgrounded, and > > > they > > > >> > can do > > > >> > >> > > >> any pause-type logic there (e.g. unlisten to > accelerometer > > > >> > events or > > > >> > >> > > >> pausing audio). > > > >> > >> > > >> > > > >> > >> > > >> Any strong objections? > > > >> > >> > > >> > > > >> > >> > > >> On Tue, Sep 9, 2014 at 4:27 PM, Andrew Grieve < > > > >> > agrieve@chromium.org > > > >> > >> > > > > >> > >> > > >> wrote: > > > >> > >> > > >> > Commit description: If multitasking is turned on > > > >> > >> (keepRunning=true), > > > >> > >> > > >> > then temporarily disable it when starting a new > activity > > > that > > > >> > >> > returns > > > >> > >> > > >> > a result - such as camera. > > > >> > >> > > >> > > > > >> > >> > > >> > > > > >> > >> > > >> > > > > >> > >> > > > > > >> > >> > > > > >> > >> > > > >> > > > > >> > > > > > > https://github.com/apache/cordova-android/commit/26adfb634651196106fb5b66f15eecb535a06d82 > > > >> > >> > > >> > > > > >> > >> > > >> > Bryce / anyone - clues as to *why* we'd want to > disable > > JS > > > >> > timers > > > >> > >> > when > > > >> > >> > > >> > firing off an intent? > > > >> > >> > > > > > > >> > >> > > > > > > >> > >> > > > > > >> > >> > > > > >> > >> > > > >> > > > > >> > > > > > > --bcaec51dd27f36ad850502e140f3--