Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Lock Device Orientation in an Apache Cordova (using plugin)
// Lock Device Orientation
function lockDeviceOrientationCallback() {
// set to either landscape
screen.orientation.lock('portrait');
console.log("locking device orientation...");
}
document.addEventListener("deviceready", lockDeviceOrientationCallback, false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.