Possible Duplicate:
Check orientation on Android phone
I am writing an app that requires my program to know the difference between whether it is in landscape mode, or in portrait. how would I go about finding this out. currently I am using the getRequestedOrientation(), but that is always returning the number 2, which basically just means that it will change depending on which way the phone is turned (as apposed to being 0 which is landscape, or 1 which is portrait.) is there a better way of doing this?