How to lock screen orientation on OSNow Android ?

How to lock screen orientation on OSNow Android ?

  
Hi,

I'm modifying the OSNow app for Android and want an app to have only "portrait" mode.
I've tried <preference name="orientation" value="portrait" /> in res/xml/config.xml and added ..android:screenOrientation="portrait"... to AndroidManifest.xml to all my activities but none of that has an effect - app still rotating when device orientation is changed. Any other option to try or there is special option somewhere else?
Thank you.

Nick

Solution

Hello Mykola.

If you're doing a customization of OutSystems Now, please search for SCREEN_ORIENTATION in WebApplicationActivity.java. The settings are being overridden at the Activity level.

Thanks

Solution
Hi César,

Thank you very much for your reply. I've changed all SCREEN_ORIENTATION... to SCREEN_ORIENTATION_SENSOR_PORTRAIT in WebApplicationActivity.java and it worked :) 

Best regards,
Nick