Hi all.
I have the following in my controller::
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady(){
console.log("LOCKING SCREEN!!");
screen.lockOrientation('portrait');
}
And I have the screen orientation plugin installed: github:
C:\my_project\trunk>cordova plugin add cordova-plugin-screen-orientation
Fetching plugin "cordova-plugin-screen-orientation" via npm
Plugin "cordova-plugin-screen-orientation" already installed on android.
No error messages appear, and the “LOCKING SCREEN” arrives fine in the console log. Yet, the screen isn’t locked at all? Any ideas?