Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android multi touch can't detect 3 fingers

I am trying to detect three fingers in the same time on HTC One M10. There is no motion called on any of this cases.

case MotionEvent.ACTION_DOWN: return "Down";
    case MotionEvent.ACTION_MOVE: return "Move";
    case MotionEvent.ACTION_POINTER_DOWN: return "Pointer Down";
    case MotionEvent.ACTION_UP: return "Up";
    case MotionEvent.ACTION_POINTER_UP: return "Pointer Up";
    case MotionEvent.ACTION_OUTSIDE: return "Outside";
    case MotionEvent.ACTION_CANCEL: return "Cancel";

I download some apps and they also cant detect 3 at the same time but they recognized two. How can I recognized only two if the motions not call. Thanks.

update After chacking agian the case MotionEvent.ACTION_MOVE didn't call. What can I do?

like image 657
Eli Elezra Avatar asked Apr 18 '16 11:04

Eli Elezra


People also ask

How do you handle single and multi-touch?

You can react to touch events in your custom views and your activities. Android supports multiple pointers, e.g. fingers which are interacting with the screen. The base class for touch support is the MotionEvent class which is passed to Views via the onTouchEvent() method. you override the onTouchEvent() method.

Does Android have multi-touch?

Multi-touch gesture happens when more then one finger touches the screen at the same time. Android allows us to detect these gestures. Android system generates the following touch events whenever multiple fingers touches the screen at the same time.


2 Answers

Turn off HTC gesture on your device.

like image 64
Lenin Avatar answered Sep 27 '22 18:09

Lenin


I used this app to check how much fingers my screen supports - https://play.google.com/store/apps/details?id=com.easylabs.multitouch.

After you receive exact number of touches your phone supports, you can detect multitouch by counting actions ACTION_DOWN (+1) and ACTION_UP(-1). With that counter you can always know how many fingers are touched to screen at this moment.

Link to answer Programmatically find how many fingers in multitouch Android device supports.

like image 33
Yev Kanivets Avatar answered Sep 27 '22 19:09

Yev Kanivets