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 06A3B18A4A for ; Tue, 25 Aug 2015 01:04:27 +0000 (UTC) Received: (qmail 88293 invoked by uid 500); 25 Aug 2015 01:04:26 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 88251 invoked by uid 500); 25 Aug 2015 01:04:26 -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 88234 invoked by uid 99); 25 Aug 2015 01:04:26 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2015 01:04:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id DE8C91AAC8E for ; Tue, 25 Aug 2015 01:04:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.901 X-Spam-Level: ** X-Spam-Status: No, score=2.901 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id xLTg-W46SIwm for ; Tue, 25 Aug 2015 01:04:13 +0000 (UTC) Received: from mail-oi0-f50.google.com (mail-oi0-f50.google.com [209.85.218.50]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 6F8352557B for ; Tue, 25 Aug 2015 01:04:13 +0000 (UTC) Received: by oiev193 with SMTP id v193so91648941oie.3 for ; Mon, 24 Aug 2015 18:04:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=ymA7Wja4LYJC3qpvkHhipvcWElTzpy04SNHvHbDP3fQ=; b=wbTsaI9yaS+HUk+K+tqfQ8dPbJKUM/aHi8XSMy5qoXMhQ871+8w0IF8QZip653U1ra Fmx56zgzi0xa65hF4t4BlnUbHS+mQ++xg0Gf4k9rDCKl3kwOxdTQSERJqJ1NGTit7foc Eda65oFZQG+d2kojelzB0i6ubktMICHdWEqmlbzwGYo8wjTXm500LROgs8w4dHiCgztr N/WdgBKLlMPzHPHBe5f9WdXOIQ8MwGzxXA2q+VwE92wOMy22tNmdcXwBadJH7BaMdypG L4eBowWBVXP5hgSf42zaDupC444miKgGHOOnINbs6GM4yhsOgz8sGh3EdWz9tz3W0tJj NhOA== X-Received: by 10.202.227.12 with SMTP id a12mr23009807oih.125.1440464652792; Mon, 24 Aug 2015 18:04:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Joe Bowser Date: Tue, 25 Aug 2015 01:04:02 +0000 Message-ID: Subject: Re: CordovaPlugin lifecycle differs from Activity lifecycle To: dev@cordova.apache.org Content-Type: multipart/alternative; boundary=001a11409402f0fad6051e184f94 --001a11409402f0fad6051e184f94 Content-Type: text/plain; charset=UTF-8 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 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 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 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 > > > > > > --001a11409402f0fad6051e184f94--