How to access Flashlight in Ionic app

|
| By Webner

Steps to access Flashlight in Ionic app

Flashlight plugin allows you to turn the flashlight on/off of your mobile in Ionic application.
Installation:

$ ionic cordova plugin add cordova-plugin-flashlight
$ npm install @ionic-native/flashlight

Platform:

  • Android
  • iOS
  • Windows Phone 8

Use:

To turn off the flashlight use:
this.flashlight.switchOff();

Leave a Reply

Your email address will not be published. Required fields are marked *