General questions

Ignoring palm input


I am using Android. 

I wanted to ask if we are using a stylus, is there a way to ignore inputs if our palm touches the tablet.



Dear Piyush,

thank you for contacting us.

Currently, you can use the getToolType function of Android, to determine if a MotionEvent is finger, stylus, mouse...

This can be done in the handleOnTouchForPointer function of the InputController.

Then, if a "Move" MotionEvent is of type "TOOL_TYPE_STYLUS", you can decide to add it to the pointerEvents, otherwise you can discard it, or choose to deal another way...

Best regards,


Thank you

Login or Signup to post a comment