Backlightβ

Improve this doc

This plugin is still in beta stage and may not work as expected. Please submit any issues to the plugin repo.

$ ionic plugin add cordova-plugin-backlight
$ npm install --save @ionic-native/backlight

Repo: https://github.com/mebibou/cordova-plugin-backlight

This plugin adds turning on/off the device backlight.

Supported platforms

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

API

Native

General