Backlightβ
This plugin is still in beta stage and may not work as expected. Please submit any issues to the plugin repo.
This plugin adds turning on/off the device backlight.
Repo: https://github.com/mebibou/cordova-plugin-backlight
Installation
- Install the Cordova and Ionic Native plugins:
$ ionic cordova plugin add cordova-plugin-backlight $ npm install --save @ionic-native/backlight@4
- Add this plugin to your app's module
Supported platforms
- Android
Usage
import { Backlight } from '@ionic-native/backlight';
constructor(private backlight: Backlight) { }
...
// Turn backlight on
this.backlight.on().then(() => console.log('backlight on'));
// Turn backlight off
this.backlight.off().then(() => console.log('backlight off'));
Instance Members
on()
This function turns backlight on
Returns: Promise<any>
Returns a promise that resolves when the backlight is on
off()
This function turns backlight off
Returns: Promise<any>
Returns a promise that resolves when the backlight is off