开发者

having problem in finding north of android device

开发者 https://www.devze.com 2023-01-03 07:06 出处:网络
I\'m new to android.I\'m developing an app in which I\'m trying to find north direction of my device anyone 开发者_如何学Gowho can solve my problem it would be great full.thanks in advance..The exampl

I'm new to android.I'm developing an app in which I'm trying to find north direction of my device anyone 开发者_如何学Gowho can solve my problem it would be great full.thanks in advance..


The example given in Android's API demos actually uses deprecated API's. The answer & following comments to this question were very useful to me, as it gives example code using non-deprecated funcionts: How to get Android compass reading?

example code can be found here: http://www.netmite.com/android/mydroid/cupcake/development/samples/Compass/src/com/example/android/compass/CompassActivity.java


Compass example from Android examples

0

精彩评论

暂无评论...
验证码 换一张
取 消