General questions

Ignoring palm input

Hi,

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.

Regards,

Piyush


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... https://developer.android.com/reference/android/view/MotionEvent#getToolType(int)


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,


Olivier

Thank you

Login or Signup to post a comment