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();