How to figure out Heading with Compass

by droid_dev » Wed, 02 Jun 2010 07:24:44 GMT

Sponsored Links

I am trying to write an app that uses the compass along with steps
travelled to approximate the path one takes
walking around.  I fugure that I can use the z value of
SENSOR_ORIENTATION or the z value returned by
SensorManager.getOrientation() which is more recommended by the API
doc.  Can someone explain why getOrientation() is prefered over
SENSOR_ORIENTATION?  They both seem to produce a magnetic north
reading, which I should be able to correct with the declination angle
getDeclination()  (android.hardware.GeomagneticField)



Other Threads

1. emulator support in 2.6.27 ?

Don't see any commits of goldfish code in the android-2.6.27 branch of
kernel/common.git, yet.  Will the emulator be supported in 2.6.27?


unsubscribe: [EMAIL PROTECTED]

2. Activities with different orientations

Let's assume i got two activities "Main" and "Sub"
Activity "Main" is forced into portrait orientation using
At some later point "Main" runs "Sub" using startActivityForResult

Somehow "Sub" also starts in portrait orientation while i would expect
the call
to setRequestedOrientation only to affect the calling activity.

How do i get "Sub" to respect the system orientation while keeping
"Main" locked in Portrait?

Thanks in advance

3. Android inside a VirtualBox - "android_power" wakup problem

4. Roaming & access to Android Market

5. New posting at funfashion4u

6. Cupcake: browser cannot connect to the internet

7. Android inside a VirtualBox - "android_power" wakup problem