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 AEEE3D3DA for ; Mon, 29 Oct 2012 19:57:21 +0000 (UTC) Received: (qmail 21942 invoked by uid 500); 29 Oct 2012 19:57:21 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 21912 invoked by uid 500); 29 Oct 2012 19:57:21 -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 21901 invoked by uid 99); 29 Oct 2012 19:57:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Oct 2012 19:57:21 +0000 X-ASF-Spam-Status: No, hits=0.3 required=5.0 tests=FREEMAIL_REPLY,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dave.c.johnson@gmail.com designates 209.85.217.175 as permitted sender) Received: from [209.85.217.175] (HELO mail-lb0-f175.google.com) (209.85.217.175) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Oct 2012 19:57:17 +0000 Received: by mail-lb0-f175.google.com with SMTP id y2so3291426lbk.6 for ; Mon, 29 Oct 2012 12:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=QjXCGRDsN+mNWhUcv/O+AQQq2X6ot0Gy1FxNAYij2pI=; b=pkrK/ZxF1OhJylQ22e6HgnofVDZFa68077oSj07DCWli+x4YX6orYrqhGV6S4prrw1 I+zZnT2hqV6TgPsw2d/y5+bUc8gXtr5OAYHXFBFHE1ig3YowdY4/0s+h3cHIAS3rN2Xl 3mQmCAAvuVPA0FddVgu1S5lKyfM4UP9BUkjILLv7LfO6WLNk2jOkVWOxbsfk+bivYAZd 5tssk0gth/8VvClaz453AUGlyMeI6P/kCSb140V3L12K73R5y1jk9rGhhgAMLTBAw4kF zQxJKEQSl9AtxpoFaTHbeoLhOW2lLc64fhfzABBdWDMwDGTVtQxwYzTEzbjAXIKb6aan oOBA== Received: by 10.152.104.148 with SMTP id ge20mr27727877lab.51.1351540615581; Mon, 29 Oct 2012 12:56:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.7.234 with HTTP; Mon, 29 Oct 2012 12:56:35 -0700 (PDT) In-Reply-To: References: From: Dave Johnson Date: Mon, 29 Oct 2012 20:56:35 +0100 Message-ID: Subject: Re: [ios] Evaluating JS during onAppWillResignActive To: dev@cordova.apache.org Cc: Michal Mocny Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org sick! On Mon, Oct 29, 2012 at 8:32 PM, Kerri Shotts wrote: > Fantastic! > > _________________________________________~Kerri Shotts, photo (http://www.photokandy.com/)Kandy (http://www.photokandy.com/) Studios LLC (http://www.photokandy.com/) > Wanna be our neighbor? Our Facebook page (http://www.facebook.com/pages/photoKandy-Studios/87979941601) & Twitter feed (http://www.twitter.com/photokandy). > > > On Monday, October 29, 2012 at 2:21 PM, Michal Mocny wrote: > >> Success! >> >> After some debugging with Andrew, we have been able to make the exec >> bridge work even in resign event. (Testing pause event, too). >> >> I've uncovered a few bugs in the process and patches will be up soon, >> but long story short, I've got local notifications being scheduled on >> app resign, huzzah! >> >> On Sat, Oct 27, 2012 at 4:36 PM, Michal Mocny wrote: >> > Thanks for the link, Shaz. >> > >> > On Fri, Oct 26, 2012 at 10:40 PM, Shazron wrote: >> > > This is something we encountered when playing with the pause and >> > > resume events. More details in the iOS Quirks of >> > > http://docs.phonegap.com/en/2.1.0/cordova_events_events.md.html#pause >> > > >> > > On Fri, Oct 26, 2012 at 8:29 AM, Michal Mocny wrote: >> > > > Local Notifications, especially on ios, are most useful when app is in >> > > > the background. It would be handy to be able to schedule them during >> > > > the window of time allotted during onAppWillResignActive. >> > > > >> > > > We even already have handlers for js document events 'resign' and >> > > > 'pause' (this one is for a >> > > > onAppDidEnterBackground event). (There are some issues with the >> > > > javascript here, seems the events aren't properly defined, will file >> > > > separately). >> > > > >> > > > However, no matter how I try, I cannot get more then a trivial amount >> > > > of js to execute during the time window before app pauses -- far less >> > > > than the allowed 5 seconds. >> > > > >> > > > According to the only (unreliable) source I've found on the subject, >> > > > its simply not possible to use the webview during >> > > > onAppWillResignActive: >> > > > http://stackoverflow.com/questions/4865742/iphone-webview-onbackground-event >> > > > >> > > > Does anyone have a better answer here? >> > > > >> > > > Thanks, >> > > > -Michal >> > > > >> > > >> > > >> > >> > >> >> >> > >