9

On Android, it is possible to check programmatically if the device supports multitouch or not wth http://developer.android.com/reference/android/content/pm/PackageManager.html#FEATURE_TOUCHSCREEN_MULTITOUCH.

Is it also possible to check exactly how many fingers the device can recognize in multitouch? E.g. from what I know, a 2-finger multitouch is supported starting with 2.x, but 3-finger multitouch from 4.0. But our customer reports having some new devices with 4.x which still don't support 3 fingers, which makes a simple check against the version of Android OS useless.

A possible solution would be to store in some dictionary for each device which number of fingers it supports max, but with 1k+ devices out there and new ones constantly appearing it's not viable.

Any solution?

EDIT: In fact I just found that the issue reported by the customer was a device issue on HTC One series. See http://www.mobiflip.de/htc-one-serie-multitouch-beschraenkung-aufheben-tipp/ The user has to turn the device-specific gestures recognition in settings to get 5+ fingers working. So, the device would probably even show 5+ fingers support. I guess we will just check for the device's model and show special popup for it telling the user to turn that HTC-specific setting off.

iseeall
  • 3,381
  • 9
  • 34
  • 43
  • As shown in the answers, you cannot determine whether a device supports some arbitrary number of touch points (e.g., 3). You need to develop your app to support the different buckets, or use `` to limit your app to only run on devices residing in those same buckets. – CommonsWare Jan 14 '13 at 16:51

2 Answers2

11

As far as I know, there is no way of obtaining the exact number of pointers supported by a device. I don't want to reinvent the wheel here, so I'd like to share a similar problem and a great answer here: Android multitouch in supported devices.

To summarize, notable is the method PackageManager.hasSystemFeature() which allows you to find out in which multitouch-support category does current device belong. Useful feature codes include:

  • FEATURE_TOUCHSCREEN_MULTITOUCH - basic support for 2 pointers
  • FEATURE_TOUCHSCREEN_MULTITOUCH_DISTINCT - support for 2+ independent pointers.
  • FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND - support for 5+ independent pointers.
Community
  • 1
  • 1
andr
  • 15,970
  • 10
  • 45
  • 59
  • I've been there too. In the end I've managed to modify the UI and gestures to just differentiate the cases of *2 pointers* and *2 independent pointers*. Hope you'll figure it out too. – andr Jan 14 '13 at 16:58
  • Do I understand it correctly: there is no way to differentiate the case when the device supports exactly 2 independent pointers and not 3 from the case when the device supports 3 or more pointers? – iseeall Jan 14 '13 at 17:09
  • @iseeall quite right, but change *3 or more* to *3 or 4*. If the device supports 5+, it should include (return `true` for) the *jazzhand* feature. – andr Jan 14 '13 at 17:13
  • In fact I just found that the issue reported by the customer was a device issue on HTC One series. See http://www.mobiflip.de/htc-one-serie-multitouch-beschraenkung-aufheben-tipp/. The user has to turn the device-specific gestures recognition in settings to get 5+ fingers working. – iseeall Jan 14 '13 at 17:17
  • @iseeall huh, thanks for sharing :) I myself have had several HTC phones and their additions to bare Android OS were (for me) always troublesome. And buggy. – andr Jan 14 '13 at 17:36
2

Instead of checking just for MULTITOUCH, you want to check for FEATURE_TOUCHSCREEN_MULTITOUCH_JAZZHAND

323go
  • 14,143
  • 6
  • 33
  • 41