5

Is there any way to get programatically the maximum number of individual fingers that the touch screen can detect simultaneously?

I've only been able to find FEATURE_TOUCHSCREEN_MULTITOUCH, FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT and FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND, which only tell me if the hardware supports "2 or more" and "5 or more", respectively. As far as I've seen, there's no way to get the exact number of fingers supported.

I've been able to find out that my Nexus S supports a maximum of 5 fingers with the following code:

public boolean onTouchEvent(MotionEvent event) {
    Log.d("multitouch", event.getPointerCount() + " fingers detected");
    return super.onTouchEvent(event);
}

But I'd like to be able to get this data from some sort of environment variable so my users won't have to go through a "detection screen" just to get this information.

Cachapa
  • 1,761
  • 1
  • 15
  • 16
  • As far as I know, getting the exact number of *pointers* supported by the screen is not available in Android. As you mentioned, there are several categories for multitouch-support. For code querying the category of the current device I recommend the code in this answer: http://stackoverflow.com/a/7244656/1820695 – andr Jan 14 '13 at 17:05

1 Answers1

0

You can do so by analizing the event.toString()

eyal
  • 2,379
  • 7
  • 40
  • 54
  • 1
    As far as I understand that only tells you the number of pointers currently detected, not the maximum ammount supported by the device's hardware. – Cachapa Jun 03 '11 at 11:51