You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Fazekas László <fa...@group4mind.hu> on 2012/10/26 19:00:16 UTC

PhoneGap interface on Android vs. addJavaScriptInterface

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

Re: PhoneGap interface on Android vs. addJavaScriptInterface

Posted by Fazekas László <fa...@group4mind.hu>.
Cool! :)

Kind regards,
  Laszlo

2012.10.26. 19:12 keltezéssel, Andrew Grieve írta:
> Hey Laszlo,
> 
> You'll be happy to know that with our next release, we've implemented a new
> Android bridge, which is even faster than using loadUrl! If you're
> interested in the details, have a look at this bug:
> 
> https://issues.apache.org/jira/browse/CB-638
> 
> Andrew
> 
> 
> On Fri, Oct 26, 2012 at 1:00 PM, Fazekas László <fa...@group4mind.hu>wrote:
> 
>> 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
>>
> 
> 
> 
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.2221 / Virus Database: 2441/5355 - Release Date: 10/26/12
> 


Re: PhoneGap interface on Android vs. addJavaScriptInterface

Posted by Michal Mocny <mm...@chromium.org>.
To be clear, that means version 2.2 will have the changes.  2.2 is
already approaching its second release candidate so you could expect
it out in some short number of weeks.

On Fri, Oct 26, 2012 at 1:12 PM, Andrew Grieve <ag...@chromium.org> wrote:
> Hey Laszlo,
>
> You'll be happy to know that with our next release, we've implemented a new
> Android bridge, which is even faster than using loadUrl! If you're
> interested in the details, have a look at this bug:
>
> https://issues.apache.org/jira/browse/CB-638
>
> Andrew
>
>
> On Fri, Oct 26, 2012 at 1:00 PM, Fazekas László <fa...@group4mind.hu>wrote:
>
>> 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
>>

Re: PhoneGap interface on Android vs. addJavaScriptInterface

Posted by Andrew Grieve <ag...@chromium.org>.
Hey Laszlo,

You'll be happy to know that with our next release, we've implemented a new
Android bridge, which is even faster than using loadUrl! If you're
interested in the details, have a look at this bug:

https://issues.apache.org/jira/browse/CB-638

Andrew


On Fri, Oct 26, 2012 at 1:00 PM, Fazekas László <fa...@group4mind.hu>wrote:

> 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
>