Question: Is it possible to use the accelerometer to detect height? For instance, if I'm holding the phone on my hand and then detect the height after raising my arm?

Thanks

Answer: 
Assuming you mean you want to detect the height the phone was raised from its staring point, yes. The android accelerometer measures force, more info on how to use it can be found [here](http://developer.android.com/reference/android/hardware/SensorEvent.html#values). Keep in mind that the accelerometer isn't a perfect device, and so your results will be approximations of how much the phone was really moved.
The inaccuracy of the accelerometer will be insignificant when compared to the error caused by an unstable accelerometer. What I mean by this is the fact that as you move your phone you will not be able to keep the accelerometer orientated perfectly i.e. you will 'naturally' rotate it about its longitudinal,lateral and azimuth axes. This means that a vertical acceleration will partly be felt in all the above axes and result in an error if you were to just integrate twice the vertical acceleration measurement.

There are ways to eliminate this error which involve gyroscopes but that requires some complicated mathematics and gyros to be fitted in your phone as well.

In theory you can integrate an accelerometer's output but in a real-world device there are practical issues you must overcome.