this is a sample application to calculate the orientation in Android