I am working on a reader app to be used on Ubuntu-Touch. When reading books from the app it would be a helpful feature to lock the orientation in either portrait or landscape. This would be useful when reading in bed sideways.

I've tried to use automaticOrientation = false or true, however, the SDK currently locks the orientation in portrait when set to false.

Is there a way to lock the orientation of the device screen in one or the other and have it stay locked?


Newer releases of Ubuntu for Phone have a global option to lock orientation, however, I would still like to do this at the app level.

I am still looking for a way to do this.

  • 1
    I always disliked this when android apps did this, and would be glad if that control stayed on a system level. it is in a quick pull down. – Mateo Dec 2 '14 at 17:35

Unfortunately there's no way yet to set a certain orientation programatically. You can however lock the orientation for your app on a certain one (portrait or landscape) in your app's desktop file. See the following link: https://wiki.ubuntu.com/Unity8/FullShellRotation. The feature has been released some time ago, and perhaps you already use that.


Is this still a problem for you? Perhaps exposing the system level functionality through your app's UI might be the best way to go. I suspect locking at the app level would be considered a bug by the system developers so it's not offered.

protected by Sylvain Pineau Nov 13 '14 at 14:30

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.