Flashlight

Contents

This plugin allows you to switch the flashlight / torch of the device on and off.

https://github.com/EddyVerbruggen/Flashlight-PhoneGap-Plugin

Ionic 手电筒Flashlight插件的安装(Installation)

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

Ionic 手电筒Flashlight插件支持的平台(Supported Platforms)

  • Android
  • iOS
  • Windows Phone 8

Ionic 手电筒Flashlight插件的用法(Usage)

import { Flashlight } from '@ionic-native/flashlight';

constructor(private flashlight: Flashlight) { }

...

this.flashlight.switchOn();