Android compass example

后端 未结 3 756
醉酒成梦
醉酒成梦 2020-12-14 04:44

I\'m searching for a compass example for Android. All I need to do is to get the correct bearing (in portrait & landscape mode).

I already found several samples,

3条回答
  •  遥遥无期
    2020-12-14 05:07

    Thanks to Dan for his sample code.

    But there is just a little correction : change event.values to event.values.clone() according to this discussion.
    It works for me now after this modification.

提交回复
热议问题