How to get Touch Event Pressure?

I need to get the pressure of a sensory event. I used the event.getPressure () method to get the pressure, and I found that pressure always gives a value of 0.

I worked on Simulator but did not test it on the device. Is there a way we can get the pressure of a touch event in a Simulator?

Please help me.

+3
source share
1 answer

I would suggest that the emulator will always give 0 for this method, since there is no way to calculate the mouse click pressure.

Also, why do you need this? According to the Android Reference, this value can vary greatly depending on the device and its calibration. This is not like what you need to use.

0

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


All Articles