Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

What kind of pressure does it measure? Air pressure? Finger pressure on the touchscreen?

share|improve this question
add comment

2 Answers 2

up vote 4 down vote accepted

Some devices, like the Motorola Xoom, the Sony Ericsson Xperia Active and the Galaxy Nexus, have an air pressure sensor built into them that measures the barometric air pressure. I have the Barometer HD app installed on my Xoom which seems to give roughly the same reading as my Suunto electronic barometer.

Support for a barometer pressure (and other environmental) sensor was added in Android 2.3 To follow the trend of linking to the related developer resource, I believe this is a TYPE_PRESSURE sensor.

See also this related StackOverflow question Android devices with pressure sensor, and this Gizmodo article for some of the possible uses for the barometer, which includes helping the device to calculate your altitude in GPS apps.

Android Engineer Dan Morrill made a post to Google+ explaining why the Galaxy Nexus had a barometer internally:

I've seen a lot of hay made about the barometer in Galaxy Nexus. Here's the skinny; it's not really as dramatic or weird as people think.

The primary purpose of the barometer is (at least, I've been told) to make GPS lockons faster. Locking on to a GPS involves numerically solving a 4-dimensional set of linear equations -- 3 dimensions in space, and time. (Yes, you get accurate time for free if you lock on to GPS.) Because of the way GPS works, this can take a few minutes.

This goes much faster if you already have an estimate of your location. This is why "aGPS" (assisted GPS) services are so popular: by starting with a rough city-level coordinate fix through something like cell-tower network location, you can reduce the amount of math you have to do to lock on. This is where the barometer comes in.

The 3 dimensions in space are latitude, longitude... and altitude. The barometer gives you a reasonable first-cut estimate for altitude. This gives you a bit of a leg up on one of the dimensions -- especially combined with "2D" aGPS -- which can help speed up lock-on in general.

Now of course, the barometer can also be used for things like, well, determining atmospheric pressure (although I'm not sure it's really weather grade.) But the main reason it's in your phone is to help with GPS.

share|improve this answer
add comment

It measures finger pressure on the touchscreen.

Source: http://developer.android.com/reference/android/view/MotionEvent.html#getPressure(int)

share|improve this answer
    
Why do you think that the pressure sensor does the same thing as the getPressure(int) function? Especially since the sensor doesn't take an int to get a specific location. –  Christian Oct 4 '10 at 15:13
1  
Yes, if we want to get pedantic, you can have an arbitrary pressure sensor that senses anything and extends android.hardware.Sensor. But in the end, 99.999% of devices out there provide a pressure reading for the pressure of the finger on the touchscreen. –  Rohan Singh Oct 4 '10 at 15:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.