Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adjust touch input sample rate on Android

On Android, is there a way of adjusting the touch input sample rate?

like image 243
Christian Neverdal Avatar asked Jul 19 '11 11:07

Christian Neverdal


1 Answers

You can't stop the system generating these events however you can selectively ignore some of the ACTION_MOVE events as you will see up to 60 per second each reporting the same co-ordinates.

You may wish to only process these ACTION_MOVE events after a set time since the last event, or skip to every 5th or 10th event etc. You'll have to experiment and see what works best for you.

Just make sure you don't skip ACTION_UP or your application may get into a confused state with the touches.

like image 83
ScouseChris Avatar answered Sep 23 '22 01:09

ScouseChris