Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ScanProvider

Index

Constructors

constructor

Properties

backCamera

backCamera: boolean = true

canChangeCamera

canChangeCamera: boolean = false

canEnableLight

canEnableLight: boolean = false

canOpenSettings

canOpenSettings: boolean = false

Private events

events: Events

frontCameraEnabled

frontCameraEnabled: boolean

hasPermission

hasPermission: boolean = false

initializeCompleted

initializeCompleted: boolean = false

initializeStarted

initializeStarted: boolean = false

isAvailable

isAvailable: boolean = true

isDenied

isDenied: boolean = false

isDesktop

isDesktop: boolean = !this.platform.isCordova

isRestricted

isRestricted: boolean = false

lightEnabled

lightEnabled: boolean

Private logger

logger: Logger

Private platform

Private qrScanner

qrScanner: QRScanner

scannerVisible

scannerVisible: boolean

text

text: string

Methods

activate

  • activate(): Promise<any>
  • (Re)activate the QRScanner, and cancel the timeouts if present.

    The status of QRScanner is passed to the callback when activation is complete.

    Returns Promise<any>

Private checkCapabilities

  • checkCapabilities(status: any): void

Private completeInitialization

  • completeInitialization(status: any): void

deactivate

  • deactivate(): void
  • Deactivate the QRScanner. To balance user-perceived performance and power consumption, this kicks off a countdown which will "sleep" the scanner after a certain amount of time.

    The status of QRScanner is passed to the callback when deactivation is complete.

    Returns void

Private destroy

  • destroy(): void

gentleInitialize

  • gentleInitialize(): Promise<any>
  • If camera access has been granted, pre-initialize the QRScanner. This method can be safely called before the scanner is visible to improve perceived scanner loading times.

    The status of QRScanner is returned to the callback.

    Returns Promise<any>

getCapabilities

  • getCapabilities(): object
  • Immediately return known capabilities of the current platform.

    Returns object

    • canChangeCamera: boolean
    • canEnableLight: boolean
    • canOpenSettings: boolean
    • hasPermission: boolean
    • isAvailable: boolean
    • isDenied: boolean
    • isRestricted: boolean

Private hide

  • hide(): void

initialize

  • initialize(): Promise<any>

isInitializeStarted

  • isInitializeStarted(): boolean

isInitialized

  • isInitialized(): boolean

Private logCapabilities

  • logCapabilities(): void

openSettings

  • openSettings(): void

Private orIsNot

  • orIsNot(bool: boolean): string

pausePreview

  • pausePreview(): void

reinitialize

  • reinitialize(): void

resumePreview

  • resumePreview(): void

scan

  • scan(): Promise<any>

toggleCamera

  • toggleCamera(): Promise<any>
  • Switch cameras (if a second camera is available).

    The status of QRScanner is passed to the callback when activation is complete.

    Returns Promise<any>

toggleLight

  • toggleLight(): Promise<any>
  • Toggle the device light (if available).

    The callback receives a boolean which is true if the light is enabled.

    Returns Promise<any>