Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slow touchmove polling on Android via browser vs native app

Seems to me that iPhone captures touchmove events about 4 times more frequently than Android.

I am coding in javascript and accessing through browser. As far as I know, both Android and iPhone use webkit - so I was not expecting such a difference.

Is there any way to increase the polling for Androids browser?

Is the polling as slow from a web-view of a native app on Android platform?

Is there any way to increase the polling for a web-view on Android platform?

Is the polling as slow in a native app on Android platform?

I know that hardware/firmware varies on Android.


What I really want to know - is any known method to increase the polling rate of android touchscreen via web-view, native code or javascript inside browser

like image 639
Billy Moon Avatar asked Feb 25 '23 18:02

Billy Moon


2 Answers

On my cheap android ICS tablet the touchmove polling frequency is really slow. It increases the polling frequency noticeably inside a div with

-webkit-transform: translate3d(0, 0, 0);

in its css.

like image 159
xyq.384.b Avatar answered Mar 15 '23 20:03

xyq.384.b


Im not super familiar with this. But I may be able to help some.

Is there any way to increase the polling for Androids browser?

  • If so it would likely require modifying the source code for it and rebuilding it.

Is the polling as slow from a web-view of a native app on Android platform?

  • I don't know but, here is a link to a very simple WebTest app which just contains a WebView with javascript enabled and a dialog that asks for the URL to go to. You can use it to test this if you like. http://dl.dropbox.com/u/5724095/Android%20Apps/WebTest.apk

Is there any way to increase the polling for a web-view on Android platform?

  • There doesn't seem to be any obvious way to do it from the methods the webview provides. If you can it would probably require messing with the source of the WebView widget.

Is the polling as slow in a native app on Android platform?

  • If you can give me some sort of metric for how many calls you're getting(perhaps calls per second?) I can test it against a non-webview in the onTouchListener and compare the two.

Edit: I did some simple tests with an OnTouchListener on a non-webview it looks like I am getting about 35-38 or so calls to onTouch() per second. To get this number I set up a listener that saves a timeStamp in ACTION_DOWN, then increments a counter every time onTouch is called, then reports what the counter is at whenever current time is 1000 millis more than start time.

like image 34
FoamyGuy Avatar answered Mar 15 '23 20:03

FoamyGuy