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 C7AEB10E2C for ; Mon, 24 Feb 2014 18:38:40 +0000 (UTC) Received: (qmail 23168 invoked by uid 500); 24 Feb 2014 18:38:07 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 23020 invoked by uid 500); 24 Feb 2014 18:38:02 -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 22267 invoked by uid 99); 24 Feb 2014 18:37:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Feb 2014 18:37:42 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of shazron@gmail.com designates 209.85.192.46 as permitted sender) Received: from [209.85.192.46] (HELO mail-qg0-f46.google.com) (209.85.192.46) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Feb 2014 18:37:39 +0000 Received: by mail-qg0-f46.google.com with SMTP id e89so15889373qgf.5 for ; Mon, 24 Feb 2014 10:37:18 -0800 (PST) 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 :content-type; bh=5z+KMclt3o7vnNOjP+GuDNx5W4viNn2YWVLIrlIQ5oE=; b=vdMb+NXXhg688zlgQCNG3avgvnz2bJpEu4aKCHaL7K+Tqs0bUE77pGmjhGcvQuc9O+ eVW9mWmkq/rzwWKahjFbB7zCBdp0qtrYcxMAtePrKz1lX/sHIw/d8Ck6WFk+u0qkxqdD r+TsQaIx3BaC8GR0Ey9lNVGZnAaQ59IWYmYxecOZzvO3+9o7ws3N0NzI+3k4Id10QQFk q2SL0l+NWLtu21z6sO9ZNKnt278RpFPzX92oH8OhsDpfeDfsc5bDiiq4q7AHXY72yfrP 4DEcWw0gAcMGpJOGGMO3xrAkp8FMu7t+R36SxtQTH8K5BWnrbZ4Jxg596glf3b1egZzj z4ag== X-Received: by 10.140.48.82 with SMTP id n76mr16990020qga.82.1393267038409; Mon, 24 Feb 2014 10:37:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.40.179 with HTTP; Mon, 24 Feb 2014 10:36:38 -0800 (PST) In-Reply-To: References: <7DB18C8A-2013-443C-BD47-C1357AB88BD7@redhat.com> From: Shazron Date: Mon, 24 Feb 2014 10:36:38 -0800 Message-ID: Subject: Re: CB-4846 To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=001a11352502e6da8604f32b42b2 X-Virus-Checked: Checked by ClamAV on apache.org --001a11352502e6da8604f32b42b2 Content-Type: text/plain; charset=ISO-8859-1 Hi Erik, The gist of it is here: http://cordova.apache.org/docs/en/3.4.0/guide_platforms_ios_plugin.md.html#iOS%20Plugins Basically, you have to modify your js interface to take in a success and failure callback. Then, in native code you create a PluginResult and set it to a specific command status (CDVCommandStatus_*), then send it back through the commandDelegate - it will figure out how to route it properly. There are examples in the link above. On Sun, Feb 23, 2014 at 11:38 PM, Erik Jan de Wit wrote: > > On 22 Feb,2014, at 0:01 , Shazron wrote: > > > Joe - this calls a background fetch handler for your app at an interval, > it > > doesn't really run in the background. > > > > Erik - just a quick code review: > > 1. The method swizzling stuff is great but what I have planned (sometime > in > > the future, in progress) is this: > > https://issues.apache.org/jira/browse/CB-5601 > > Ahh cool, I'll keep an eye on that one. > > > 2. The way you are using callbacks is not quite correct > > Could you elaborate on that, I'll be more then happy to fix it > > > > > Agree on it being a user space plugin -- but I was thinking it could be > in > > cordova-plugins maybe when the time comes > > I would love for it to be a cordova core plugin > > > > > > > On Fri, Feb 21, 2014 at 1:47 PM, Joe Bowser wrote: > > > >> Is this actually running a service? I thought this just runs a > >> Cordova App in the background, which Android already has a setting > >> for. > >> > >> On Fri, Feb 21, 2014 at 1:44 PM, Brian LeRoux wrote: > >>> I think its cool as a user space plugin for now though. Have you > >> published > >>> it to http://plugins.cordova.io ? (Its just like npm / you can read up > >> on > >>> how here: https://github.com/apache/cordova-plugman) > >>> > >>> I really like the idea of us looking at background processing. > >>> > >>> Android services: how would that work? Does Firefox OS have the concept > >> of > >>> background services? I know Chrome Mobile Apps guys have been doing > some > >>> thinking here too. > >>> > >>> > >>> On Fri, Feb 21, 2014 at 2:53 AM, Erik Jan de Wit > >> wrote: > >>> > >>>> Hi, > >>>> > >>>> I've created an initial version for > >>>> https://issues.apache.org/jira/browse/CB-4846 the plugin is located > at > >>>> https://github.com/edewit/cordova-background-plugin > >>>> > >>>> Cheers, > >>>> Erik Jan > >> > > --001a11352502e6da8604f32b42b2--