Cordova Plugin Screen OrientationThis Cordova plugin mainly works for the orientation of the device screen. It is used to set or lock the screen orientation for Windows, iOS, and Android platforms. This plugin is based on the Screen Orientation API, due to this, API matches to the current specification. Installation:To add this plugin in your app, you have to install it by typing the below command: Supported Orientations
Usage:Events:The orientationchange event is fired from the Android and iOS platforms on the window object. The current version of this plugin allows a user to use the window object for receiving the notifications. Example:Android Notes:For the Android platform, when the device is rotated 180 degrees, screen.orientation property does not update. Windows UWP Notes:When we talk about the Windows platform, Windows-UWP (Windows Store Apps) only displays the changed orientation, if the device consists some sort of accelerometer. It remains in the internal state of the orientation, but the device screen does not rotate unless the device supports it. CodeHTML:JavaScript:Output: Next TopicCordova Plugin SplashScreen |