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?
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.
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.
Turn off HTC gesture on your device.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With