yagnik-scanner
v1.1.0
Published
this plugin is combo of flash-light && scanner
Readme
scanner
this plugin is combo of flash-light && scanner
Install
npm install scanner
npx cap syncAPI
echo(...)isAvailable()switchOn(...)switchOff()isSwitchedOn()prepare()hideBackground()showBackground()startScan()stopScan()checkPermission(...)openAppSettings()- Interfaces
echo(...)
echo(options: { value: string; }) => Promise<{ value: string; }>| Param | Type |
| ------------- | ------------------------------- |
| options | { value: string; } |
Returns: Promise<{ value: string; }>
isAvailable()
isAvailable() => Promise<{ value: boolean; }>Returns: Promise<{ value: boolean; }>
switchOn(...)
switchOn(options: { intensity?: number; }) => Promise<void>| Param | Type |
| ------------- | ------------------------------------ |
| 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>| Param | Type |
| ------------- | ------------------------------------------------------------------------- |
| options | CheckPermissionOptions |
Returns: Promise<CheckPermissionResult>
openAppSettings()
openAppSettings() => Promise<void>Interfaces
ScanResult
| Prop | Type |
| ---------------- | -------------------- |
| hasContent | boolean |
| content | string |
CheckPermissionResult
| Prop | Type |
| ---------------- | -------------------- |
| granted | boolean |
| denied | boolean |
| asked | boolean |
| neverAsked | boolean |
| restricted | boolean |
| unknown | boolean |
CheckPermissionOptions
| Prop | Type |
| ----------- | -------------------- |
| force | boolean |
