Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How well supported is pressure sensitivity across Android devices?

I want to write an app that reacts to how much pressure is applied from the user's finger. Specifically, I want to use this to vary the thickness of a line being drawn. I'm happy with just reacting to the surface area of the finger applied to the screen.

The MotionEvent.getSize() and MotionEvent.getPressure() functions seem exactly what I want but mention nothing about their accuracy or what their return values mean. Are the return values from these method accurate enough on most Android devices for my needs?

I'm curious why there are no popular Android apps that make use of pressure sensitivity. I've found very few articles that mention these methods and have only come across posts that discuss device specific bugs: http://groups.google.com/group/android-porting/browse_thread/thread/7e8b1bb77dc7d82d

like image 270
rbcc Avatar asked May 03 '11 15:05

rbcc


2 Answers

Note that capacitive touch screens don't actually directly measure pressure; generally the pressure information they report is computed in some way based on the size (since pushing your finger harder will tend to cause more of it to touch the screen).

You definitely can't assume that either pressure or size will be reported for a particular device. Also, for pressure, the relationship between this and the actual pressure the user is pressing is going to vary widely between the devices. For something production-quality, you will want your application to be able to adjust itself to the data it is receiving on whatever device it is running.

like image 129
hackbod Avatar answered Oct 21 '22 21:10

hackbod


You will find useful information here in a project named Markers. Pressure detection has been available somehow in capacitive screens after Eclair.

like image 43
eArmin Avatar answered Oct 21 '22 21:10

eArmin