Skip to main content

Constants Reference

The SDK provides various constants for configuration. Access them via cordova.plugins.AilaSDKConstants.

Usage

const constants = cordova.plugins.AilaSDKConstants;

AilaSDK.init({
multiScanMode: constants.multiScanMode.AilaMultiScanModeOn,
beepMode: constants.beepMode.AilaBeepModeOff,
mrzMode: constants.mrzMode.AilaMRZModeOn
});

AilaCodeType

Represents a barcode type or MRZ. Use with codesConfiguration array.

constants.AilaCodeType.AilaCodeTypeNone        // Disable all code types
constants.AilaCodeType.AilaCodeTypeAztec // Aztec codes
constants.AilaCodeType.AilaCodeType2of5 // 2 of 5 codes and variants
constants.AilaCodeType.AilaCodeTypeCodaBar // CodaBar codes
constants.AilaCodeType.AilaCodeType39 // Code 39
constants.AilaCodeType.AilaCodeType93 // Code 93
constants.AilaCodeType.AilaCodeType128 // Code 128 and variants
constants.AilaCodeType.AilaCodeTypeDataMatrix // DataMatrix codes
constants.AilaCodeType.AilaCodeTypeEAN // EAN codes and variants
constants.AilaCodeType.AilaCodeTypeDataBar // GS1 DataBar codes
constants.AilaCodeType.AilaCodeTypeMRZ // MRZ strings
constants.AilaCodeType.AilaCodeTypeMSIPlessey // MSI/Plessey codes
constants.AilaCodeType.AilaCodeTypePDF417 // PDF417 codes
constants.AilaCodeType.AilaCodeTypeUPC // UPC codes and variants
constants.AilaCodeType.AilaCodeTypeQR // QR codes

multiScanMode

Control whether multiple barcodes can be scanned in a single session.

Default: AilaMultiScanModeOff

constants.multiScanMode.AilaMultiScanModeOff  // Return first barcode found in a frame
constants.multiScanMode.AilaMultiScanModeOn // Can return multiple barcodes in a single frame

When enabled, the SDK can capture multiple barcodes and return them as a stream. Useful for scanning multiple items or finding specific barcodes among many.

duplicateFilter

Control duplicate detection in multi-scan mode.

Default: AilaDuplicateFilterOn

constants.duplicateFilter.AilaDuplicateFilterOff  // Return all barcodes as soon as available
constants.duplicateFilter.AilaDuplicateFilterOn // Only return unique barcodes in a session
info

This property only applies when multiScanMode is enabled.

When enabled (and multi-scan mode is active), each barcode is returned only once per session until timeout (4s with no motion) or resetScan() is called.

beepMode

Control automatic beep feedback on successful scans.

Default: AilaBeepModeOn

constants.beepMode.AilaBeepModeOff  // No automatic beep
constants.beepMode.AilaBeepModeOn // Automatically beep upon scan

When multi-scan mode is enabled, beep mode is not available. Regardless of the configured beep mode, a beep can be manually triggered via beep().

focusMode

Select the camera focus algorithm.

Default: AilaStandardFocusMode

constants.focusMode.AilaStandardFocusMode  // Normal focus algorithm for connected device
constants.focusMode.AilaSafeFocusMode // Sweep focus with reduced lighting

It is recommended that AilaSafeFocusMode be used only in special situations when AilaStandardFocusMode is not responsive.

mrzMode

Enable or disable MRZ scanning.

Default: AilaMRZModeOff

constants.mrzMode.AilaMRZModeOff  // Doesn't scan for MRZ text
constants.mrzMode.AilaMRZModeOn // Return MRZ text as JSON formatted string

When AilaMRZModeOn is enabled, we recommend using the capture view to assist the user. The kiosk lighting will be disabled whenever MRZ scanning is invoked.

mrzDetectionMode

Enable early MRZ component detection for UI feedback.

Default: AilaMRZDetectionModeOff

constants.mrzDetectionMode.AilaMRZDetectionModeOff  // Doesn't detect MRZ pieces
constants.mrzDetectionMode.AilaMRZDetectionModeOn // Send notifications when pieces detected

Sends events when MRZ components are detected, before complete scanning.

gs1ParsingMode

Control GS1 Application Identifier formatting.

Default: AilaGS1ParsingModeOff

constants.gs1ParsingMode.AilaGS1ParsingModeOff  // Return string with no parsing
constants.gs1ParsingMode.AilaGS1ParsingModeOn // Return with AIs in parentheses

dlParsingMode

Enable structured parsing of US driver's license barcodes.

Default: AilaDLParsingModeOff

constants.dlParsingMode.AilaDLParsingModeOff  // Return standard pdf417 with no parsing
constants.dlParsingMode.AilaDLParsingModeOn // Return structured DL data for US driver's licenses

upceExpansionMode

Control UPC-E to UPC-A conversion.

Default: AilaUPCEExpansionModeOff

constants.upceExpansionMode.AilaUPCEExpansionModeOff  // Return standard UPC-E barcodes
constants.upceExpansionMode.AilaUPCEExpansionModeOn // Expand UPC-E into UPC-A format

eanSupplementalMode

Control EAN supplemental code handling.

Default: AilaEANSupplementalModeOff

constants.eanSupplementalMode.AilaEANSupplementalModeOff          // Ignore supplemental digits
constants.eanSupplementalMode.AilaEANSupplementalModeNotRequired // Return with supplemental if available
constants.eanSupplementalMode.AilaEANSupplementalModeRequired // Only return when supplemental present

When NotRequired is selected, if the EAN barcode is captured first, the result may be returned without supplemental digits. Supplemental code will be space delimited.

id1CardDetectionMode

Enable automatic detection of ID-1 sized cards in the tray.

Default: AilaID1CardDetectionModeOff

constants.id1CardDetectionMode.AilaID1CardDetectionModeOff  // Do not detect cards
constants.id1CardDetectionMode.AilaID1CardDetectionModeOn // Detect cards

When enabled, events are posted when a card is detected. Only compatible with Interactive Kiosks fitted with an ID Tray.

imageCaptureDebugMode

Control image return behavior on capture timeout.

Default: AilaImageCaptureDebugModeOff

constants.imageCaptureDebugMode.AilaImageCaptureDebugModeOff  // Don't return images on timeout
constants.imageCaptureDebugMode.AilaImageCaptureDebugModeOn // Return images with error watermark

enabledCameraPosition

Select which camera to use for scanning.

Default: AilaEnabledCameraPositionBack

constants.enabledCameraPosition.AilaEnabledCameraPositionBack   // Use back camera
constants.enabledCameraPosition.AilaEnabledCameraPositionFront // Use front camera
constants.enabledCameraPosition.AilaEnabledCameraPositionBoth // Use both cameras

Currently only supports barcode scanning through the front camera.

cloudLicensing

Enable automatic license updates from Aila's cloud service.

Default: AilaCloudLicensingOff

constants.cloudLicensing.AilaCloudLicensingOff  // Don't request updates from cloud
constants.cloudLicensing.AilaCloudLicensingOn // Pull down updates from cloud

rsm

Enable device health and performance monitoring.

Default: AilaRSMOn

constants.rsm.AilaRSMOff  // Do not send status information
constants.rsm.AilaRSMOn // Automatically send status information

Remote status monitoring allows Aila to monitor system health, performance, and provide enhanced customer support.

powerManagementMode

Enable automatic power optimization.

Default: AilaPowerManagementModeOn

constants.powerManagementMode.AilaPowerManagementModeOff  // Don't change device/SDK settings
constants.powerManagementMode.AilaPowerManagementModeOn // Automatically adjust for power stability

When enabled:

  • Efficiency Mode: Reduces screen brightness to 90% for cooler 24/7 operation
  • Safe Mode: Optimizes settings during power deficiencies to keep the system online

debugLevel

Control SDK logging verbosity.

Default: AilaDebugLevelWarn

constants.debugLevel.AilaDebugLevelSilent  // No messages
constants.debugLevel.AilaDebugLevelError // Error messages only (E)
constants.debugLevel.AilaDebugLevelWarn // Warnings and errors (W)
constants.debugLevel.AilaDebugLevelInfo // Informational messages (I)
constants.debugLevel.AilaDebugLevelDebug // Internal debugging (D)
constants.debugLevel.AilaDebugLevelBulk // High-volume low-level messages (B)

Each level includes messages of equal or greater severity. Debug and Bulk levels may have no effect in release versions.

Log messages are formatted: [2015-05-06 11:09:24.181 <function> <E|W|I|D|B>] <message>