I would like to find out the detailed orientation of a device, preferably one of SCREEN_ORIENTATION_LANDSCAPE, SCREEN_ORIENTATION_PORTRAIT, S
You could do it in a very simple way:
get the screen widhtand height.
screen width will be always higher when device is in landscape orientation.
Display display = getWindowManager().getDefaultDisplay();
int width = display.getWidth();
int height = display.getHeight();
Toast.makeText(getApplicationContext(), "" + width + "," + height,
Toast.LENGTH_SHORT).show();
if (width > height) {
Toast.makeText(getApplicationContext(), "LandScape",
Toast.LENGTH_SHORT).show();
}