I'm using Sensor.TYPE_LINEAR_ACCELERATION and Sensor.TYPE_ROTATION_VECTOR to read the rotation vector and accelerometer values from the device's sensors.
Now, I want to use this data to calculate the vertical acceleration of the phone - i.e. regardless of how the phone is rotated, I want to be able to read the acceleration in the up/down direction relative to the ground.
How can I accomplish this?
