11
Views
2
Comments
Screen.orientation.lock('portrait'); is not working.

I am running a javascript screen.orientation.lock('portrait'); OnDestroy action of a screen, but it doesnt seem to work.

I tried to run it on a buttonclick also, it doesnt seem to work either.

How do I fix it? Has it changed?


Rank: #87

Hi Amol,

follow this post with solution

https://www.outsystems.com/forums/discussion/45410/mobile-screen-orientation-lock-in-version-11/


Try in extensibility configurations:


{
"preferences": {
"global": [
{
"name": "orientation",
"value": "portrait"
}
]
}
}


To test, you need install a new build.


Hope this will help you.

Regards

Rahul

Rank: #1759

I want it to work only for one screen, not the entire app.