3

Are there any scale on the touch inputs? I know there is sensibility settings to say if you touch or not, but does it has a scale for hard pressure and low pressure too?

If so, what scale is it? 0 to 1 or 0-255 or what possiblities?

BerggreenDK
  • 4,915
  • 9
  • 39
  • 61

3 Answers3

3

Well, that entirely depends on the API. Android, for example, has a getPressure() accessor in MotionEvents that returns a float between 0.0f and 1.0f, but the actual granularity of your result obviously depends on the hardware - if the screen can only detect "pressed" vs "non-pressed", you will only ever get 0.0f or 1.0f.

EDIT: As per Julio Gorgé's answer, iOS does not offer this functionality.

EboMike
  • 76,846
  • 14
  • 164
  • 167
  • Do you know if there are any Android devices in the wild that actually provide pressure readings other than "pressed" and "non-pressed"? – Scott W Dec 23 '10 at 02:21
  • 1
    Intriguing question! I browsed through the market a bit and found Luke Hutchison's Multitouch Visualizer 2. Even on my old Droid, there seems to be a hit of pressure sensitivity - the circle gets bigger as I press harder, although not much. http://www.androlib.com/android.application.org-metalev-multitouch-visualizer2-jjxCq.aspx – EboMike Dec 23 '10 at 02:32
  • I don't know anything about iOS. – EboMike Dec 23 '10 at 02:39
2

EboMike already answered correctly your question regarding Android devices. For iOS, I can say it does not expose touch pressure information through public APIs at this moment.

Julio Gorgé
  • 10,056
  • 2
  • 45
  • 60
0

There's a workaround for iOS. See my answer in Tap pressure strength detection using accelerometer

Community
  • 1
  • 1
picciano
  • 22,341
  • 9
  • 69
  • 82