From callback-dev-return-9786-apmail-incubator-callback-dev-archive=incubator.apache.org@incubator.apache.org Wed Jul 11 18:00:02 2012 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 85974D790 for ; Wed, 11 Jul 2012 18:00:02 +0000 (UTC) Received: (qmail 60027 invoked by uid 500); 11 Jul 2012 18:00:02 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 60001 invoked by uid 500); 11 Jul 2012 18:00:02 -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 59993 invoked by uid 99); 11 Jul 2012 18:00:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2012 18:00:02 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of anis.kadri@gmail.com designates 209.85.161.175 as permitted sender) Received: from [209.85.161.175] (HELO mail-gg0-f175.google.com) (209.85.161.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2012 17:59:56 +0000 Received: by ggnp4 with SMTP id p4so1422143ggn.6 for ; Wed, 11 Jul 2012 10:59:35 -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=VXzpDa6jzvXJSX6uxrRnlSCxcCSYSmGtN/O7BMcDLic=; b=DGRdOYczW/aSsmEAMxlE2qlj0xkWmbq0GiEpOsNjYvLEzxd3PWFfLeduwozLdW1TB6 NJDEeNehEk/PCUgzDx5ATtKBkt/qPorbBYKUFqpJstbH8AEd5gCCz6e3iffhygbp4Q5e 3vEe3FoZ1+CpMljzn44Hugn+mHfEXrpPFcs6aZYyLBcTvCfCUhanTdJLtUD1DZmnkxTP d1BGLRk0IyKzzQSJD1zowc08HFW1I5fWoAbg1GUEQ9LjVkdKAJq2QBJ8SUHFCjK89TyR z05GeGG5aQ+buaRQoX1smZ6LR8eFzPKmQrDtz1rCJUcLDFGqvSgs9ae+JYxrOed47tqE 0VUA== MIME-Version: 1.0 Received: by 10.236.181.232 with SMTP id l68mr32904678yhm.94.1342029575874; Wed, 11 Jul 2012 10:59:35 -0700 (PDT) Received: by 10.236.153.38 with HTTP; Wed, 11 Jul 2012 10:59:35 -0700 (PDT) In-Reply-To: References: Date: Wed, 11 Jul 2012 10:59:35 -0700 Message-ID: Subject: Re: Shim all the plugins From: Anis KADRI To: callback-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org +1 I think LegacyContext will work in most cases. Especially startActivityForResult and startActivity. Which most plugins use. On Tue, Jul 10, 2012 at 6:38 PM, Simon MacDonald wrote: > I checked the code in as CB-993: Android plugin problems upgrading to > 1.9.0 as that was where the problem originally was reported. > > Simon Mac Donald > http://hi.im/simonmacdonald > > > On Tue, Jul 10, 2012 at 5:55 PM, Michael Brooks > wrote: >> Nice work Simon! >> >> +1 >> >> I can create the 2.00 Plugin Upgrade Guide issue for each platform. >> >> On Tue, Jul 10, 2012 at 2:25 PM, Filip Maj wrote: >> >>> +1 ! File the issues! >>> >>> On 7/10/12 1:51 PM, "Joe Bowser" wrote: >>> >>> >Why didn't I think of this? >>> > >>> >+1 >>> > >>> >On Tue, Jul 10, 2012 at 1:38 PM, Simon MacDonald >>> > wrote: >>> >> So in 1.9.0 with the change brought on by CordovaWebView all of the >>> >> plugins are broken. By broken, I mean they won't compile unless you go >>> >> in and change the source code. That may not sound like broken to us >>> >> but to many of our users who are not familiar with Java that means >>> >> they are very, very broken. >>> >> >>> >> In this pull request: >>> >> >>> >> >>> >> >>> https://github.com/macdonst/cordova-android/commit/0180342dff4ce6e8f63e3d >>> >>753cb1f1588c43f9f0 >>> >> >>> >> I've created a shim so that Plugins that are still using the "ctx" >>> >> variable should continue to work unmodified. I've tested it and it is >>> >> working with the following plugins: >>> >> >>> >> LowLatencyAudio >>> >> LocalNotificaiton >>> >> MacAddressPlugin >>> >> BarcodeScanner >>> >> ChildBrowser >>> >> TTS >>> >> VideoPlayer >>> >> IMEI >>> >> SpeechRecognizer >>> >> PhoneListener >>> >> >>> >> I think that gives me a pretty good cross section, I just don't have >>> >> time to test them all. >>> >> >>> >> My suggestions are: >>> >> >>> >> 1) we add this in for 2.0.0 so the existing plugins continue to work. >>> >> 2) we put in a deprecation notice for "ctx" as it is going away soon >>> >> 3) we write a detailed set of instructions on how to get your 3rd >>> >> party plugin upgraded to work in 2.0.0 without using "ctx". >>> >> >>> >> Please lemme know what you think... >>> >> >>> >> Simon Mac Donald >>> >> http://hi.im/simonmacdonald >>> >>>