This may sound a newbie question anyway I’m new to Android development.
Basically what I need to do it to prevent the activity from changing its rotation but meanwhile I need to detect the device orientation change i.e. if device orientation has been changed from top to botton, or from top to left-portrait etc.
in iOS there is an analogue - (BOOL)shouldAutorotateToInterfaceOrientation where you can handle the device orientation change and tell the view if you want it to autorotate or not.
Please pay attention that no any manual data handling of accelerometer data.
So basically I want to detect DEVICE’s orientation change and prevent Activity from rotating.
I’m also playing with data from Sensor to detect shake. But internally Android does some filtration of signals in order to decide when to rotate the UI. So basically I need to catch that event. Anyone can help ?
Simple formulation of my question : I need to detect android device orientation change without playing manually with sensor data, while keeping activity orientation stick to some orientation
Figure the out the solution.
http://android-er.blogspot.in/2010/08/orientationeventlistener-detect.html