Touch Devices (iOS, Android)

Is there a scale on the touch inputs? I know that there are sensitivity settings to say whether you are touching or not, but does it have a scale for hard pressure and low pressure?

If so, what is the scale? 0 to 1 or 0-255 or what features?

+3
source share
3 answers

Well, that is completely API dependent. For example, Android has an accessory getPressure()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 “clicked” and “no, clicked”, you get only 0.0f or 1.0f.

EDIT: As Julio Gorge said, iOS does not offer this functionality.

+3
source

EboMike has already correctly answered your question regarding Android devices. For iOS, I can say that at the moment it does not provide pressure information using public APIs.

+2
source

There is a workaround for iOS. See My Answer in Accelerometer Pressure Strength Detection

0
source

Source: https://habr.com/ru/post/1781771/


All Articles