Android Full Screen
This plugin enables developers to offer users a true full screen experience in their Cordova and PhoneGap apps for Android. Using Android 4.0+, you can use true full screen in "lean mode", the way you see in apps like YouTube, expanding the app right to the edges of the screen, hiding the status and navigation bars until the user next interacts. This is ideally suited to video or cut-scene content. In Android 4.4+, however, you can now enter true full screen, fully interactive immersive mode. In this mode, your app will remain in true full screen until you choose otherwise; users can swipe down from the top of the screen to temporarily display the system UI.
Repo: https://github.com/mesmotronic/cordova-plugin-fullscreen
Installation
- Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add cordova-plugin-fullscreen $ npm install --save @ionic-native/android-full-screen@4
- Add this plugin to your app's module
Supported platforms
- Android
Usage
import { AndroidFullScreen } from '@ionic-native/android-full-screen';
constructor(private androidFullScreen: AndroidFullScreen) { }
...
this.androidFullScreen.isImmersiveModeSupported()
.then(() => console.log('Immersive mode supported'))
.catch(err => console.log(err));
Instance Members
isSupported()
Is this plugin supported?
Returns: Promise<void>
isImmersiveModeSupported()
Is immersive mode supported?
Returns: Promise<void>
immersiveWidth()
The width of the screen in immersive mode.
Returns: Promise<number>
immersiveHeight()
The height of the screen in immersive mode.
Returns: Promise<number>
leanMode()
Hide system UI until user interacts.
Returns: Promise<void>
showSystemUI()
Show system UI.
Returns: Promise<void>
showUnderStatusBar()
Extend your app underneath the status bar (Android 4.4+ only).
Returns: Promise<void>
showUnderSystemUI()
Extend your app underneath the system UI (Android 4.4+ only).
Returns: Promise<void>
immersiveMode()
Hide system UI and keep it hidden (Android 4.4+ only).
Returns: Promise<void>
setSystemUiVisibility(visibility)
Manually set the the system UI to a custom mode. This mirrors the Android method of the same name. (Android 4.4+ only).
Param | Type | Details |
---|---|---|
visibility |
AndroidSystemUiFlags
|
Bitwise-OR of flags in AndroidSystemUiFlags |
Returns: Promise<void>