问题
I am making a GPS-Like App and I need to know when the user turns left or right (his heading) to change the rotation of the position marker.
I've tried this
and this
But none of them is working, the first one just randomly changes even if I haven't totally turned and the second one just works if you change the device from horizontal to vertical or viceversa.
Can someone give me a hand please?
Thanks.
来源:https://stackoverflow.com/questions/52626704/android-know-when-user-turns-to-left-or-right