1.1.0 • Published 2 years ago

yagnik-scanner v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

scanner

this plugin is combo of flash-light && scanner

Install

npm install scanner
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>
ParamType
options{ value: string; }

Returns: Promise<{ value: string; }>


isAvailable()

isAvailable() => Promise<{ value: boolean; }>

Returns: Promise<{ value: boolean; }>


switchOn(...)

switchOn(options: { intensity?: number; }) => Promise<void>
ParamType
options{ intensity?: number; }

switchOff()

switchOff() => Promise<void>

isSwitchedOn()

isSwitchedOn() => Promise<{ value: boolean; }>

Returns: Promise<{ value: boolean; }>


prepare()

prepare() => Promise<void>

hideBackground()

hideBackground() => Promise<void>

showBackground()

showBackground() => Promise<void>

startScan()

startScan() => Promise<ScanResult>

Returns: Promise<ScanResult>


stopScan()

stopScan() => Promise<void>

checkPermission(...)

checkPermission(options: CheckPermissionOptions) => Promise<CheckPermissionResult>
ParamType
optionsCheckPermissionOptions

Returns: Promise<CheckPermissionResult>


openAppSettings()

openAppSettings() => Promise<void>

Interfaces

ScanResult

PropType
hasContentboolean
contentstring

CheckPermissionResult

PropType
grantedboolean
deniedboolean
askedboolean
neverAskedboolean
restrictedboolean
unknownboolean

CheckPermissionOptions

PropType
forceboolean
1.1.0

2 years ago

1.0.0

2 years ago

0.0.1

2 years ago