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.
You get position by integrating the linear acceleration twice but **the error is horrible. It is useless in practice.**

Here is [an explanation why (Google Tech Talk)](http://www.youtube.com/watch?v=C7JQ7Rpwn2k) at 23:20. I highly recommend this video.

Similar questions:

[track small movements of iphone with no GPS](https://stackoverflow.com/q/6158176/341970)  

[What is the real world accuracy of phone accelerometers when used for positioning?](https://stackoverflow.com/q/6027724/341970)  

[how to calculate phone's movement in the vertical direction from rest?](https://stackoverflow.com/q/6291110/341970)  

[iOS: Movement Precision in 3D Space](https://stackoverflow.com/q/5550453/341970)  

[How to use Accelerometer to measure distance for Android Application Development](https://stackoverflow.com/q/6352681/341970)  

[How can I find distance traveled with a gyroscope and accelerometer?](https://stackoverflow.com/q/6647314/341970)  

[Distance moved by Accelerometer](https://stackoverflow.com/q/6645126/341970)