[android-developers] Re: Accelerometer data

2009-06-30 Thread House n @ MIT
Thanks for the help. You were right, Peli, I was using the old constant for the new interface. I made that small change, and everything is looking the way it should now. Thanks again! On Jun 30, 10:53 am, Peli wrote: > Then the solution is quite simple: > > Housen@ MIT used the deprecated con

[android-developers] Re: Accelerometer data

2009-06-30 Thread Peli
Then the solution is quite simple: House n @ MIT used the deprecated constant (@deprecated) SensorManager.SENSOR_ACCELEROMETER = (const) 2 with the new API, while jdesbonnet used Sensor.TYPE_ACCELEROMETER = (const) 1 The constant value used above (=2) corresponds to Sensor.TYPE_MAGNETIC_FIELD =

[android-developers] Re: Accelerometer data

2009-06-30 Thread jdesbonnet
I checked with my Vodafone branded HTC Magic (using Android 1.5 API). Using SensorEventListener and the following code to register the listener: Sensor accSensor = mSensorManager.getSensorList (Sensor.TYPE_ACCELEROMETER).get(0); mSensorManager.registerListener(accSensorListener, accSensor, SENSOR

[android-developers] Re: Accelerometer data

2009-06-30 Thread Peli
> x: 12.5625 y: 20.8125 z: -16.4375 Unfortunately, I didn't have a chance yet to try out sensors through the SDK 1.5 API on a real device yet, but these numbers look like they could be from a compass (in microTesla). Did you try rotating the device around its axis, while lying flat on

[android-developers] Re: Accelerometer data

2009-06-30 Thread jdesbonnet
I had a good laugh at this one. I could be wrong, but often when complex arithmetic code involving physical units fail and the code originates from the US it usually means one thing.. hint: Mars Climate Orbiter disaster (http://en.wikipedia.org/wiki/Mars_Climate_Orbiter). The figure you mention (