Slow polling of touch messages on Android through a browser and native application

It seems to me that iPhone captures touchmove events about 4 times more often than Android.

I am coding in javascript and getting through the browser. As far as I know, Android and iPhone use webkit, so I did not expect such a difference.

Is there a way to increase the survey for Androids browser?

Is polling slow with the web presentation of a native Android app?

Is there a way to increase the survey for Android web view?

Is polling as slow in a native Android app?

I know that the hardware / firmware is Android dependent.


What I really want to know is any known method of increasing the frequency of polling an android touch screen via web browsing, native code or javascript inside a browser.

+4
source share
4 answers

I am not very familiar with this. But I can help someone.

Is there a way to increase the survey for Androids browser?

  • If so, you probably need to change the source code for it and rebuild it.

Is polling slow with the web presentation of a native Android app?

Is there a way to increase the survey for web browsing on the Android platform?

  • There seems to be no obvious way to do this from the methods that web browsing provides. If possible, this will probably require fiddling with the source of the WebView widget.

Is polling slow in my own application? on the Android platform?

  • If you can give me some kind of metric for the number of calls you receive (maybe calls per second?), I can test it against non-webview in onTouchListener and compare them.

Edit: I did some simple tests with OnTouchListener in non-web browsing, it looks like I get about 35-38 or so call to onTouch () per second. To get this number, I set up a listener that stores timeStamp in ACTION_DOWN, and then increments the counter every time onTouch is called, and then reports that the counter is in the case when the current time is 1000 milliseconds more than the start time.

+2
source

On my cheap Android telephony Android tablet, the frequency of polling for touch music is very slow. This noticeably increases the polling rate inside the div with

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

in his css.

+4
source

I tried the webview test, and unfortunately it looks just like a browser.

Here is some information for captured touchmove events that draw the letter a. The duration of both is the same (663 versus 672), and all units are in milliseconds.

"iPhone_via_browser_times": // (in ms from the touchstart event) [0.104.125.136.151.167.183.199.215.231.247.263.279.295.311.327.347.357.372.391.407.423.439.455.503.519.535.551.567.583.603.615.631.647.663]

"Android_via_webview_times": // (in ms from touchstart) [0,56,140,195,252,336,392,449,531,615,672]

"Android_via_browser_times": // (in ms) [0.105.161.217.300.356.413.497.553]

Android through web polls on average every (672/11) 61 ms Android through web polls on average every (553/9) 61 ms

Poll iPhone on average each (663/35) 19 ms

But I have other data from other Android devices where the poll is worse.

+2
source

Some issues have been found related to the interval in question. http://code.google.com/p/android/issues/detail?id=4549 http://code.google.com/p/android/issues/detail?id=5491

I am stuck due to the user not smoothing the line drawing line. But we use smooth methods dynamically to solve this problem.

0
source

Source: https://habr.com/ru/post/1344277/


All Articles