Only recognize the stylus, not finger

I have developing an application to Samsung Note, and I want only recognize the stylus. I don want to recognize finger. It is possible How I can set this in multi line widget?


Dear Customer,

It is indeed possible to make the difference in between stylus and finger events. Here is an example:

public static boolean isStylusMotionEvent(MotionEvent event, int pointerIndex)
if (event.getToolType(pointerIndex) == MotionEvent.TOOL_TYPE_STYLUS)
return true;

return false;

Best regards,


I want to use only the stylus pen. Can i disable finger?

The event.getToolType function allows to detect touch events with finger as well:

if(event.getToolType(0) == MotionEvent.TOOL_TYPE_FINGER) {
//finger touch

If you want to read more about it:

Best regards

Can i get the same answer for iOS (Objective C)?

The equivalent on iOS seems to be UITouchType:

• UITouchTypeDirect
A direct touch from a finger on the screen.
Available in iOS 9.0 and later.
• UITouchTypeIndirect
An indirect touch, not on a screen.
Available in iOS 9.0 and later.
A touch from a stylus.
Available in iOS 9.1 and later

Hope it helps.
Best regards

Login or Signup to post a comment