How to figure out Heading with Compass

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


Sponsored Links
 Hi,

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)

Thanks!


--



Other Threads

1. Application already deployed. No need to reinstall.

I'm having an annoying issue when developing my app within Eclipse +
ADT...

Application already deployed. No need to reinstall.

If I've changed my code it doesn't recognise the change unless I clean
the project. It then uploads a new apk! I didn used to have to do this
after a change!. "Build automatically" is specified in eclipse, so I
can't understand why it's not uploading a new apk after a change :-(

I'm using Eclipse Galileo and ADT 0.9.5

It didn't do this before. Its very annoying!!

Anyone have any ideas?

-- 

2. Get unique ID of phone - Settings.Secure.ANDROID_ID not working on N1?

Can't say anything about the ANDROID_ID thing. What's wrong with the
TelephonyManager? You can get the device ID, subscriber ID, Sim serial
number, etc. I think the only permission you need is

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>

in the manifest.

Ken



> see

3. call onCreate each time app starts

4. AudioTrack in streaming mode

5. Eclipse setup - how can I run the Email app from the plattform source

6. Forcing the Symbols Soft Keyboard

7. Intent to upload or download files over SFTP, FTPS or FTP