How can I check if the Android phone is in Landscape or Portrait?
The Android SDK can tell you this just fine:
getResources().getConfiguration().orientation