incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Bowser <bows...@gmail.com>
Subject Re: why apache cordova keep Polling and XHR two ways to fetch data?
Date Mon, 07 May 2012 16:37:58 GMT
Isn't the XHR approach faster than polling because we don't have to wait on
the interval?

The reason we have a callback server has nothing to do with
addJavascriptInterface, and everything to do with WebView.loadUrl().  Even
if we passed everything through one Javascript Interface (which is what we
would be doing, so that we can keep the current exec pattern), we would
still have to execute callbacks, which means that we would either poll the
interface, or use the XHR since using loadUrl to run Javascript on the
WebView interrupts the UI thread, and can have unpredictable results.

As for the WebViewTest, some people found some pretty low-end phones to
test it on, but zero failures so far.  Of course, people need to report the
errors, so that may be the fatal flaw in that exercise.  I personally think
that there's zero devices that crash because of addJavascriptInterface and
that the emulator is a piece of crap because it doesn't have to maintain
the same standards as devices do.  We can bring addJavascriptInterface
back, but I don't think it's going to magically make things better.

On Mon, May 7, 2012 at 9:07 AM, Simon MacDonald
<simon.macdonald@gmail.com>wrote:

> Also, if an Android device has a proxy setup XHR fails so we revert to
> polling.
>
> Simon Mac Donald
> http://hi.im/simonmacdonald
>
>
> On Mon, May 7, 2012 at 12:03 PM, Filip Maj <fil@adobe.com> wrote:
>
> > There were some issues with the Android 2.3 emulator (_possibly_ some
> > actual devices but this is still up for debate) where one of the two
> > methods (either polling or prompt() overriding) did not work. So right
> now
> > we try to use one, if it fails, we fall back to the other.
> >
> > I would love to simplify this to just one method (and possibly even just
> > addJavascriptInterface) but we need more time to test this thoroughly.
> >
> > Hey Joe, what is the latest on that small little test app you deployed to
> > the Play Store? Do we have any crash reports or anything of that sort?
> >
> > On 5/6/12 1:59 AM, "陈振华" <chenzh@ucweb.com> wrote:
> >
> > >when i read the source code of apache cordova. i find it has two ways to
> > >fecth the callback data from native code?
> > >
> > >why the author did'nt keep polling only?
> > >
> > >are there some issues exist?
> > >
> > >Thanks for your anwser!
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message