I'm developing an app that is required to get device orientation to know what the direction the users are going, even they are stopped. But many smartphones don't have the compass sensor, then I need to get the accelerometer and gyroscope data.
So, how can I get the device orientation using these sensors?
I've already read some similar questions (here) , but it was applied to Android native, and it has a event.values
that returns an array that I don't know how to get using Ionic plugins.