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?
Update:
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.
Best Answer
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.