flashlight.* — Flashlight


Type Library


Overview

The Flashlight plugin provides access to the flash LED light source, which can be used as a torch.

Supported platforms: iOS 6+ and Android 3.0+.

Syntax

local flashlight = require('plugin.flashlight')

Functions

flashlight.on()

flashlight.off()

Project Settings

First, get the plugin on the Corona Marketplace page.

Add an entry into the plugins table of build.settings. When added, the build server will integrate the plugin during the build phase.

	settings = {
		plugins = {
			['plugin.flashlight'] = {publisherId = 'com.spiralcodestudio'}
		}
	}

Example

local flashlight = require('plugin.flashlight')

-- -- --

flashlight.on()

Sample Project

A sample project can be found here.

https://github.com/Lerg/plugins-sample-flashlight