Android / Amazon Fire How to lock the device orientation?

M

McBiggity

Guest
I'm currently developing a game for android and the menu system can be used in portrait or landscape and then when the game starts the user is asked to rotate the device to horizontal if not already.

Once the device is rotated to the horizontal position I would like to be able to lock the orientation however I've found no way of doing this and os_lock_orientation doesn't seem to do anything.

Has anyone had experience with this issue or function and know how to accomplish this?
 
M

McBiggity

Guest
Thanks for the replies, I was able to lock the device to landscape orientation however when it locked the orientation would flip 180 degrees. This means when I lock the orientation the game appears upside down and the device has to be rotated this way. Has anyone came across this before?
 
Top