Currently working with Cordova, I am attempting to set the screen orientation to landscape for Android. Utilizing the screen-orientation plugin found at: https://www.npmjs.com/package/cordova-plugin-screen-orientation
In my JavaScript code, I have implemented it as follows:
screen.lockOrientation("landscape");
However, I encounter an error stating that screen.lockOrientation is not a function. Upon logging(screen), I can confirm that the method does exist. The plugin has also been added to my config.xml, following a similar question posed here: How to configure plugin "cordova-plugin-screen-orientation" in config.xml
The error persists. Does anyone have any suggestions on how to resolve this issue?