Hacker News new | ask | show | jobs
by newhouseb 5226 days ago
> Also, I can absolutely see the need to send large number of messages - a streaming accelerometer API, for example, which is on our roadmap.

There is no benefit to sending ondevicemotion events out to the native code because you can always get higher frequency updates on the native code (60Hz vs 20Hz) and sending them in via stringViaEvaluatingJavascriptFromString is identical between Trigger.io and PhoneGap (and will happen with a lower latency than things are drawn on screen in a UIWebView).

2 comments

Yep, I was referring more to native accelerometer events being fed into the web view.

True enough that on iOS we would perform comparably, but for Android, it would mean "long"-polling a local web server at 60Hz!

And, this half-baked reason was the example that James can give off the top of his head for not using PhoneGap.