Gyroscope delta movement

Hi all,

I'm working on an app where I want to use the gyroscope.
When I lift the phone about 2 inches, I want this to be counted. After that, the phone will descend again about the same distance, but that does not need to be counted.

I already have a label where I can display the z-value (zAngularVelocity), but this changes every xx milliseconds, making a 2 inch deviation uncountable.

Does anyone have an idea how I can count a height difference of 2 inches?

You probably cannot measure distance with the simple gyroscope in your Android Henk. Do you have any documentation showing that this might be possible? Here is a search use gyroscope to measure distance - Google Search

What you can do is measure this stuff GyroscopeSensor.