OrientationEventListener don't work on emulator like context.getSystemService (context.SENSOR_SERVIC). OrientationEventListener work well on G1 and development board. I have tested it. below code is a tested code.
public Orientation (Context context) { super (context); mListener = new OrientationEventListener (context, SensorManager.SENSOR_DELAY_UI) { public void onOrientationChanged (int orientation) { Log.v (TAG, "onOrientationChanged"); } }; mListener.enable (); } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---