title: get current orientation in degree of mobile in android
body: <p>I want to get current orientation of mobile in android. I can detect orientation change using OrientationEventListener. but this only work when there is a change in orientation. I want to do something when orientation is changed. But for some purpose I need  to know my current orientation if mobile is on the table and there is no orientation change. From some googling I found that sersormanager.getorientation and sensormanager.getRotationMatrix can be used for this purpose. But I can not implement it in code. Can anyone provide me some code to get my current orientation in degree?</p>