Android orientation problems


I am developing an app for android and having quite some trouble to properly handle the orientation of the screen.

For one, the callback of orientationChanged() is not called on rotation of the screen, even though I have set in the AndroidManifest.xml the orientation=sensor.

I can see on the logcat though, that the resize call back is called, via the function windowResized(). So, that is the only way I have of detecting an orientation change. I am however not able to distinguish between OF_ORIENTATION_DEFAULT and OF_ORIENTATION_180 and between OF_ORIENTATION_90_LEFTand OF_ORIENTATION_90_RIGHT.

I feel like I am missing something here and that there should be a better easier way. Any thoughts? Much appreciated.

Also, strangely enough, when I also try to force an orientation in an android app (it doesn’t app in iOS) with ofSetOrientation(OF_ORIENTATION_90_LEFT) for example, I stop getting the windowResized() callbacks, and the app just keeps in that orientation no matter how I turn the phone.