I want to write a little app that is able to rotate the screen from potrait to landscape and vice versa. I have succesfully done this using SetOrientationL, and works well.

However, if I set the orientation to landscape, and then exit the app (or send the app to the background) the phone automatially changes the orientation back to potrait - how can I keep the orientation of the phone in landscape mode even after you exit from the app? or how can I set the orientation to landscape mode for all apps and not just for the app that invoked the SetOrientationL method?

Any ideas?