Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 748A9D7C4 for ; Wed, 29 Aug 2012 21:52:55 +0000 (UTC) Received: (qmail 99567 invoked by uid 500); 29 Aug 2012 21:52:55 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 99543 invoked by uid 500); 29 Aug 2012 21:52:55 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 99534 invoked by uid 99); 29 Aug 2012 21:52:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Aug 2012 21:52:55 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=FRT_ADOBE2,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of braden@google.com designates 209.85.210.175 as permitted sender) Received: from [209.85.210.175] (HELO mail-iy0-f175.google.com) (209.85.210.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Aug 2012 21:52:49 +0000 Received: by iaky10 with SMTP id y10so2061087iak.6 for ; Wed, 29 Aug 2012 14:52:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-system-of-record; bh=uj3OIminSryHoPxkT27hjTosWq6AdXF6/0iSOs3THQ0=; b=M0Fdw1eGIjCUjaWann3jpomOY7NmqM9u+ArevnQMJCXyfKjaEN8M05eHuwHrpP+ra4 ca2+x9wGdrJqYGP9aYfUsTxX3QNbv7EYjfa7sSNfJkSM/3mhnvp3w1FEJox/6lBnaIYX PUvwhZMFSAFFX2t4KlUkR5ORgUh6thxdY88nv15PlnGHdJzCiJaTE72eaS90HtoWOkRn hEtr+nLBt07i0s7Zy33MCqhg6f9P9j2dcN3UyBxvY4GBq7IcO3ONix05VWI2iJwv0S9Y Y6jVz1WUNsBYsRgzZLqPs0eoYcr234Kq1ovBSR+R7AScoK8Sbgeowk17qzhj4TKaLhHX ioAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :x-system-of-record:x-gm-message-state; bh=uj3OIminSryHoPxkT27hjTosWq6AdXF6/0iSOs3THQ0=; b=X6InpGFhda2YumJbNm0GqMPvzwgGu9nXevObUTMdQG3v1ZJpu/2/DKi/6GHVG2UHrR Dz0IhJ7cpTwRworVfP4kQjYcNLcK3ya1LbtfPovqSOLu6BERZ4F1HzyqwuaU64CRuJ8G IIIv6XqMHoBjwqakLcZSAmSqGgFFREuHe294Rr7AiJrELzqIy+Bf5RBGAENAtaP1Bx1z cRMzgqUWrEtcOj5rdM39UqqcMB6/oO2PXShBLLLsuEWflocAUhwr7cYNsYZ+xAnpdsgk ipxd1uvHcUMHdRiHV10a8uAkc2KTrpERuvXTf9b4nNcAyS42aNRqm0Rl94z3+ygYwZmw YWQA== Received: by 10.50.202.4 with SMTP id ke4mr3391487igc.72.1346277148258; Wed, 29 Aug 2012 14:52:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.202.4 with SMTP id ke4mr3391481igc.72.1346277148092; Wed, 29 Aug 2012 14:52:28 -0700 (PDT) Sender: braden@google.com Received: by 10.231.129.9 with HTTP; Wed, 29 Aug 2012 14:52:28 -0700 (PDT) In-Reply-To: References: Date: Wed, 29 Aug 2012 17:52:28 -0400 X-Google-Sender-Auth: 8GKlLRdejLxoeC4g7xIxUhUTUoU Message-ID: Subject: Re: [DISCUSS][Android] Polling plugins onNewIntent From: Braden Shepherdson To: Braden Shepherdson Cc: callback-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=f46d044788432e694b04c86e9331 X-System-Of-Record: true X-Gm-Message-State: ALoCoQn96TTralXI4AtHbKpRez1QbRzbkp0ISYwr0dWptBt3pwqEAzhhlrOElevBjBYfW8KnIRPaNLT/ZzVsQN2bM7QtHTkr1wmeU9qcfah8G+N35C6gFi7Tijuk2tA4BtxR9v0iLBorZpw0qSvvGq68AmN4GTK+3IdRbyRwkia6WtP83/NJUF0OskO7ow9EvoU0hicFe/ICnZw4eFdtYTjFIPNHa67xgw== --f46d044788432e694b04c86e9331 Content-Type: text/plain; charset=ISO-8859-1 Hm, I'm trying to use sendJavascript in onNewIntent (which is getting called) to call a global function (or testing with alert()) and it's not getting called. I can't find any examples of sendJavascript being used in plugins for Android. Am I doing it wrong? How should I call Javascript from native? On Wed, Aug 29, 2012 at 5:20 PM, Braden Shepherdson wrote: > I don't know about the Message API, but it certainly has something to do > with the code a function below your link [1]: We capture onNewIntent and > call that on plugins. >_> > > So I'll use that, and it looks like it will work great. Thanks for the > link! > > Braden > > > On Wed, Aug 29, 2012 at 4:14 PM, Filip Maj wrote: > >> Is this at all related to the high-level / general purpose "Message" api >> we have in plugins [1] [2]? Could that be used instead? >> >> [1] >> >> https://github.com/apache/incubator-cordova-android/blob/master/framework/s >> rc/org/apache/cordova/api/PluginManager.java#L318 >> [2] >> >> https://github.com/apache/incubator-cordova-android/blob/master/framework/s >> rc/org/apache/cordova/api/Plugin.java#L114 >> >> On 8/29/12 12:10 PM, "Braden Shepherdson" wrote: >> >> >I'm working on the status bar notification plugin for Android, hoping to >> >add support for onclick as in the W3C spec. >> > >> >There are basically three approaches to capturing the Intent when the >> >notification is clicked: >> >1. Create a new Activity that causes the onclick to be called and then >> >hands off to the main Cordova Activity. >> >2. Have the user of the plugin add onNewIntent() to the root of the app, >> >with code provided in the plugin's documentation. >> >3. Do something similar to the plugin polling when the top-level URL >> >changes. >> > >> >I've been investigating (1), but it requires adding an Activity to the >> app >> >manifest. (2) sucks in several ways. (3) appeals to me the most, but >> >requires that polling of plugins. It will only be active when something >> is >> >actually sending new Intents to the app, which currently doesn't happen >> at >> >all. It would also enable other apps to call into Cordova apps and have >> >plugins capture those events. (Share, etc.) >> > >> >Thoughts? I'm mostly glad I can actually support onclick. >> > >> >Braden >> >> > --f46d044788432e694b04c86e9331--