I'm currently struggling with the use of detectors in Android. I'm working on an app, and I'd like it to perform certain operations after the user make their phone 'roll' in their hand.
To be more precise, I'd like them to roll their phone 720° around the local Z Axis (if I'm not mistaken, the 'height' of the phone) and then, have the app return something.
I really don't know how to do this. So far, the best I've came up with was to declare 8 boolean variables accounting each for a quarter of a roll made, set to true when roll values gets within a certain range. Yeah. I'm that desperate.
Any help is appreciated!