If I take my device and hang it upside down and restart it, the start screen will always be oriented in the same rotation. There is no rotation change event and using the following code in my own app does not yield the rotation either:
WindowManager wm = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
int rotation = wm.getDefaultDisplay().getRotation();
I am running this on Android 2.3. I suspect that one of the sensors provides the orientation as to what is up but can’t find any API that gives you the orientation. In fact, you don’t even have to hang the device upside down. You can lay it down or position it in any orientation and the start screen always orientates itself correctly. The start screen never flips or changes orientation at all.
Accelerometer gives orientation. Direction of gravity is bottom ) So android won’t be able to determine orientation in space )