0

I'm new to android.I'm developing an app in which I'm trying to find north direction of my device anyone who can solve my problem it would be great full.thanks in advance..

Talha
  • 809
  • 4
  • 13

2 Answers2

1

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

Community
  • 1
  • 1
bjg222
  • 827
  • 1
  • 11
  • 21
0

Compass example from Android examples

Yann Ramin
  • 32,895
  • 3
  • 59
  • 82