hi there, Sure.. I'm still cleaning up and fixing an issue with the landscape devices. Here's where I am right now - landscape seems to work like it used to with TYPE_ORIENTATION.
public void onSensorChanged( SensorEvent event ) { switch( event.sensor.getType() ) { case Sensor.TYPE_ACCELEROMETER: gravity = event.values.clone();// TODO - optimize boolean b = SensorManager.getRotationMatrix( R, null, gravity, geomagnetic ); if( b ) { switch( rotation ) { case Surface.ROTATION_0://TODO case Surface.ROTATION_180: SensorManager.remapCoordinateSystem( R, SensorManager.AXIS_MINUS_X, SensorManager.AXIS_Y, outR ); break; case Surface.ROTATION_90://TODO case Surface.ROTATION_270: // TODO break; } SensorManager.getOrientation( outR, values ); pitch = (float) Math.toDegrees( values[1] ); } break; case Sensor.TYPE_MAGNETIC_FIELD: geomagnetic = event.values.clone(); break; } } warning: that code's not optimized. hope it helps though. On Thu, Jun 9, 2011 at 2:19 AM, String <sterling.ud...@googlemail.com>wrote: > Mind posting your corrected code for others who are trying to do something > similar? > > String > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en