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 AF571D705 for ; Fri, 26 Oct 2012 17:00:54 +0000 (UTC) Received: (qmail 58775 invoked by uid 500); 26 Oct 2012 17:00:54 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 58751 invoked by uid 500); 26 Oct 2012 17:00:54 -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 58743 invoked by uid 500); 26 Oct 2012 17:00:54 -0000 Delivered-To: apmail-incubator-callback-dev@incubator.apache.org Received: (qmail 58740 invoked by uid 99); 26 Oct 2012 17:00:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2012 17:00:54 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [212.92.23.120] (HELO mail.g4m.hu) (212.92.23.120) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2012 17:00:48 +0000 Received: by mail.g4m.hu (Postfix, from userid 1004) id 5BD8A5215BF; Fri, 26 Oct 2012 19:03:12 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.1.7-deb3 (2006-10-05) on g4m.group4mind.hu X-Spam-Level: Received: from [127.0.0.1] (g4m [127.0.0.1]) by mail.g4m.hu (Postfix) with ESMTP id 11C4052007A for ; Fri, 26 Oct 2012 19:03:11 +0200 (CEST) Message-ID: <508AC1A0.6010307@group4mind.hu> Date: Fri, 26 Oct 2012 19:00:16 +0200 From: =?ISO-8859-2?Q?Fazekas_L=E1szl=F3?= User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121010 Thunderbird/16.0.1 MIME-Version: 1.0 To: callback-dev@incubator.apache.org Subject: PhoneGap interface on Android vs. addJavaScriptInterface X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, RATWARE_GECKO_BUILD autolearn=ham version=3.1.7-deb3 Hi! About 1 month ago, I've developed a PhoneGap application to one of my clients. He dropped it back to me, because the UI was slow and laggy on a Vodafone SmartTab. After some debug, I've realized, the problem is the speed of the PhoneGap interface, and the XHR poll mechanism (I've found some info about it here: http://nullisnotanobject.com/phonegap-native-bridge). The final solution was creation of a new PhoneGap like interface through addJavascriptInterface and loadUrl. This new interface is working like a charm without lag. I think, the perfect solution would be an optional support of addJavascriptInterface/loadUrl way. If it is working on the device without bugs, PhoneGap could use this faster way automatically instead of the present solution, or developers could enable it optionally. For example, in my case, the application will be used only on Vodafone SmartTabs, where the standard addJavascriptInterface/loadUrl solution working fine and fast, so in this case I could enable it. Kind regards, Laszlo