I would like to find out the detailed orientation of a device, preferably one of SCREEN_ORIENTATION_LANDSCAPE, SCREEN_ORIENTATION_PORTRAIT, S
I think your problem is that you can detect landscape and portrait but not reverse landscape and reverse protrait as they are not supported in older versions. To detect what you can do is that you can use both oreintation and rotation. I am giving you an idea it may be useful for you.
try this i think it may solve your problem.
int orientation = getResources().getConfiguration().orientation;
int rotation = getWindowManager().getDefaultDisplay().getRotation();
int actual_orientation = -1;
if (orientation == Configuration.ORIENTATION_LANDSCAPE
&& (rotation == Surface.ROTATION_0
|| rotation == Surface.ROTATION_90)){
orientation = Configuration.ORIENTATION_LANDSCAPE;
} else if (orientation == Configuration.ORIENTATION_PORTRAIT
&& (rotation == Surface.ROTATION_0
|| rotation == Surface.ROTATION_90)) {
orientation = Configuration.ORIENTATION_PORTRAIT;
} else if (orientation == Configuration.ORIENTATION_LANDSCAPE
&& (rotation == Surface.ROTATION_180
|| rotation == Surface.ROTATION_270)){
orientation = //any constant for reverse landscape orientation;
} else {
if (orientation == Configuration.ORIENTATION_PORTRAIT
&& (rotation == Surface.ROTATION_180
|| rotation == Surface.ROTATION_270)){
orientation = //any constant for reverse portrait orientation;
}
}