I looked over SensorManager and was still开发者_运维问答 unsure, how do I detect if the phone is looking at true north (or any other direction for that matter).
If you are just looking for a sample, the publishers of Professional Android 2 Application Development have all their example code available for download and there is a compass application in chapter 14.
精彩评论