UNPKG

scandit-sdk

Version:

Scandit Barcode Scanner SDK for the Web

773 lines 163 kB
<!doctype html> <html class="default no-js"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>BarcodePicker | Scandit Barcode Scanner SDK for the Web</title> <meta name="description" content="Documentation for Scandit Barcode Scanner SDK for the Web"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../assets/css/main.css"> <script async src="../assets/js/search.js" id="search-script"></script> </head> <body> <header> <div class="tsd-page-toolbar"> <div class="container"> <div class="table-wrap"> <div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base=".."> <div class="field"> <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> <input id="tsd-search-field" type="text" /> </div> <ul class="results"> <li class="state loading">Preparing search index...</li> <li class="state failure">The search index is not available</li> </ul> <a href="../index.html" class="title">Scandit Barcode Scanner SDK for the Web</a> </div> <div class="table-cell" id="tsd-widgets"> <div id="tsd-filter"> <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> <div class="tsd-filter-group"> <div class="tsd-select" id="tsd-filter-visibility"> <span class="tsd-select-label">All</span> <ul class="tsd-select-list"> <li data-value="public">Public</li> <li data-value="protected">Public/Protected</li> <li data-value="private" class="selected">All</li> </ul> </div> <input type="checkbox" id="tsd-filter-inherited" checked /> <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> </div> </div> <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> </div> </div> </div> </div> <div class="tsd-page-title"> <div class="container"> <ul class="tsd-breadcrumb"> <li> <a href="../modules.html">Scandit Barcode Scanner SDK for the Web</a> </li> <li> <a href="BarcodePicker.html">BarcodePicker</a> </li> </ul> <h1>Class BarcodePicker</h1> </div> </div> </header> <div class="container container-main"> <div class="row"> <div class="col-8 col-content"> <section class="tsd-panel tsd-comment"> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>A barcode picker element used to get and show camera input and perform scanning operations.</p> </div> <p>The barcode picker will automatically fit and scale inside the given <em>originElement</em>.</p> <p>Each barcode picker internally contains a <a href="Scanner.html">Scanner</a> object with its own WebWorker thread running a separate copy of the external Scandit Data Capture library. To optimize loading times and performance it&#39;s recommended to reuse the same picker and to already create the picker in advance (hidden) and just display it when needed whenever possible.</p> <p>As the loading of the external Scandit Data Capture library can take some time, the picker always starts inactive (but showing GUI and video) and then activates, if not paused, as soon as the library is ready to scan. The <a href="BarcodePicker.html#on">on</a> method targeting the <a href="BarcodePicker.html#ready">ready</a> event can be used to set up a listener function to be called when the library is loaded. The picker will be ready to start scanning when the library is fully loaded.</p> <p>By default the external Scandit Data Capture library is preloaded in order to reduce the initialization time as much as possible.</p> <p>The picker can also operate in Single Image Mode: letting the user click/tap to take a single image to be scanned via the camera (mobile) or a file select dialog (desktop). This is provided automatically as fallback by default when the OS/browser only supports part of the needed features and cannot provide direct access to the camera for video streaming and continuous scanning, or can also be forced on/off. This behaviour can be set up on creation via the <em>singleImageModeSettings</em> option. Note that in this mode some of the functions provided by the picker will have no effect.</p> <p>By default an alert is shown if an internal error during scanning is encountered which prevents the scanning procedure from continuing when running on a local IP address. As this uses the built-in <a href="BarcodePicker.html#scanError">scanError</a> event functionality, if unwanted it can be disabled by calling <a href="BarcodePicker.html#removeAllListeners">removeAllListeners</a> on the BarcodePicker instance (right after creation).</p> <p>In accordance with our license terms, the Scandit logo displayed in the bottom right corner of the barcode picker must be displayed and cannot be hidden by any method. Workarounds are not allowed.</p> </div> </section> <section class="tsd-panel tsd-hierarchy"> <h3>Hierarchy</h3> <ul class="tsd-hierarchy"> <li> <span class="target">BarcodePicker</span> </li> </ul> </section> <section class="tsd-panel-group tsd-index-group"> <h2>Index</h2> <section class="tsd-panel tsd-index-panel"> <div class="tsd-index-content"> <section class="tsd-index-section "> <h3>Events</h3> <ul class="tsd-index-list"> <li class="tsd-kind-event tsd-parent-kind-class tsd-is-static"><a href="BarcodePicker.html#cameraAccessError" class="tsd-kind-icon">camera<wbr>Access<wbr>Error</a></li> <li class="tsd-kind-event tsd-parent-kind-class tsd-is-static"><a href="BarcodePicker.html#processFrame" class="tsd-kind-icon">process<wbr>Frame</a></li> <li class="tsd-kind-event tsd-parent-kind-class tsd-is-static"><a href="BarcodePicker.html#ready" class="tsd-kind-icon">ready</a></li> <li class="tsd-kind-event tsd-parent-kind-class tsd-is-static"><a href="BarcodePicker.html#scan" class="tsd-kind-icon">scan</a></li> <li class="tsd-kind-event tsd-parent-kind-class tsd-is-static"><a href="BarcodePicker.html#scanError" class="tsd-kind-icon">scan<wbr>Error</a></li> <li class="tsd-kind-event tsd-parent-kind-class tsd-is-static"><a href="BarcodePicker.html#submitFrame" class="tsd-kind-icon">submit<wbr>Frame</a></li> </ul> </section> <section class="tsd-index-section "> <h3>Methods</h3> <ul class="tsd-index-list"> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#accessCamera" class="tsd-kind-icon">access<wbr>Camera</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#addListener" class="tsd-kind-icon">add<wbr>Listener</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#applyCameraSettings" class="tsd-kind-icon">apply<wbr>Camera<wbr>Settings</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#applyScanSettings" class="tsd-kind-icon">apply<wbr>Scan<wbr>Settings</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#clearSession" class="tsd-kind-icon">clear<wbr>Session</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#createParserForFormat" class="tsd-kind-icon">create<wbr>Parser<wbr>For<wbr>Format</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#destroy" class="tsd-kind-icon">destroy</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#getActiveCamera" class="tsd-kind-icon">get<wbr>Active<wbr>Camera</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#getScanner" class="tsd-kind-icon">get<wbr>Scanner</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#isCameraSwitcherEnabled" class="tsd-kind-icon">is<wbr>Camera<wbr>Switcher<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#isMirrorImageEnabled" class="tsd-kind-icon">is<wbr>Mirror<wbr>Image<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#isPinchToZoomEnabled" class="tsd-kind-icon">is<wbr>Pinch<wbr>ToZoom<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#isPlaySoundOnScanEnabled" class="tsd-kind-icon">is<wbr>Play<wbr>Sound<wbr>OnScan<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#isReady" class="tsd-kind-icon">is<wbr>Ready</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#isScanningPaused" class="tsd-kind-icon">is<wbr>Scanning<wbr>Paused</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#isTapToFocusEnabled" class="tsd-kind-icon">is<wbr>Tap<wbr>ToFocus<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#isTorchToggleEnabled" class="tsd-kind-icon">is<wbr>Torch<wbr>Toggle<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#isVibrateOnScanEnabled" class="tsd-kind-icon">is<wbr>Vibrate<wbr>OnScan<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#isVisible" class="tsd-kind-icon">is<wbr>Visible</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#on" class="tsd-kind-icon">on</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#pauseScanning" class="tsd-kind-icon">pause<wbr>Scanning</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#reassignOriginElement" class="tsd-kind-icon">reassign<wbr>Origin<wbr>Element</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#removeAllListeners" class="tsd-kind-icon">remove<wbr>All<wbr>Listeners</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#removeListener" class="tsd-kind-icon">remove<wbr>Listener</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#resumeScanning" class="tsd-kind-icon">resume<wbr>Scanning</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setActiveCamera" class="tsd-kind-icon">set<wbr>Active<wbr>Camera</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setCameraFOVSwitcherEnabled" class="tsd-kind-icon">set<wbr>CameraFOVSwitcher<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setCameraSwitcherEnabled" class="tsd-kind-icon">set<wbr>Camera<wbr>Switcher<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setCameraType" class="tsd-kind-icon">set<wbr>Camera<wbr>Type</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setGuiStyle" class="tsd-kind-icon">set<wbr>Gui<wbr>Style</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setLaserArea" class="tsd-kind-icon">set<wbr>Laser<wbr>Area</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setMirrorImageEnabled" class="tsd-kind-icon">set<wbr>Mirror<wbr>Image<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setPinchToZoomEnabled" class="tsd-kind-icon">set<wbr>Pinch<wbr>ToZoom<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setPlaySoundOnScanEnabled" class="tsd-kind-icon">set<wbr>Play<wbr>Sound<wbr>OnScan<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setTapToFocusEnabled" class="tsd-kind-icon">set<wbr>Tap<wbr>ToFocus<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setTargetScanningFPS" class="tsd-kind-icon">set<wbr>Target<wbr>ScanningFPS</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setTorchEnabled" class="tsd-kind-icon">set<wbr>Torch<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setTorchToggleEnabled" class="tsd-kind-icon">set<wbr>Torch<wbr>Toggle<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setVibrateOnScanEnabled" class="tsd-kind-icon">set<wbr>Vibrate<wbr>OnScan<wbr>Enabled</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setVideoFit" class="tsd-kind-icon">set<wbr>Video<wbr>Fit</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setViewfinderArea" class="tsd-kind-icon">set<wbr>Viewfinder<wbr>Area</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setVisible" class="tsd-kind-icon">set<wbr>Visible</a></li> <li class="tsd-kind-method tsd-parent-kind-class"><a href="BarcodePicker.html#setZoom" class="tsd-kind-icon">set<wbr>Zoom</a></li> <li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="BarcodePicker.html#create" class="tsd-kind-icon">create</a></li> </ul> </section> </div> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Events</h2> <section class="tsd-panel tsd-member tsd-kind-event tsd-parent-kind-class tsd-is-static" data-tags="asmemberof "> <a name="cameraAccessError" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> camera<wbr>Access<wbr>Error</h3> <ul class="tsd-signatures tsd-kind-event tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">camera<wbr>Access<wbr>Error<span class="tsd-signature-symbol">(</span>error<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Fired when an error occurs during camera access.</p> </div> <dl class="tsd-comment-tags"> <dt data-tag="asmemberof">asmemberof</dt> <dd data-tag="asmemberof"><p>BarcodePicker</p> </dd> </dl> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>error: <span class="tsd-signature-type">Error</span></h5> <div class="tsd-comment tsd-typography"> <p>The Error that was triggered.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-event tsd-parent-kind-class tsd-is-static" data-tags="asmemberof "> <a name="processFrame" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> process<wbr>Frame</h3> <ul class="tsd-signatures tsd-kind-event tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">process<wbr>Frame<span class="tsd-signature-symbol">(</span>scanResult<span class="tsd-signature-symbol">: </span><a href="ScanResult.html" class="tsd-signature-type" data-tsd-kind="Class">ScanResult</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Fired when a new frame is processed by the external Scandit Data Capture library. This event is fired on every frame, independently from the number of recognized barcodes or texts (can both be none). The returned barcodes and texts are affected by <a href="ScanSettings.html">ScanSettings</a>&#39;s <em>codeDuplicateFilter</em> and <a href="TextRecognitionSettings.html">TextRecognitionSettings</a>&#39;s <em>textDuplicateFilter</em> options.</p> </div> <dl class="tsd-comment-tags"> <dt data-tag="asmemberof">asmemberof</dt> <dd data-tag="asmemberof"><p>BarcodePicker</p> </dd> </dl> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>scanResult: <a href="ScanResult.html" class="tsd-signature-type" data-tsd-kind="Class">ScanResult</a></h5> <div class="tsd-comment tsd-typography"> <p>The result of the scanning operation on the image.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-event tsd-parent-kind-class tsd-is-static" data-tags="asmemberof "> <a name="ready" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> ready</h3> <ul class="tsd-signatures tsd-kind-event tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">ready<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Fired when the external Scandit Data Capture library has been loaded and the barcode picker can thus start to scan barcodes or texts.</p> </div> <dl class="tsd-comment-tags"> <dt data-tag="asmemberof">asmemberof</dt> <dd data-tag="asmemberof"><p>BarcodePicker</p> </dd> </dl> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-event tsd-parent-kind-class tsd-is-static" data-tags="asmemberof "> <a name="scan" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> scan</h3> <ul class="tsd-signatures tsd-kind-event tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">scan<span class="tsd-signature-symbol">(</span>scanResult<span class="tsd-signature-symbol">: </span><a href="ScanResult.html" class="tsd-signature-type" data-tsd-kind="Class">ScanResult</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Fired when new barcodes or texts are recognized in the image frame. The returned barcodes and texts are affected by <a href="ScanSettings.html">ScanSettings</a>&#39;s <em>codeDuplicateFilter</em> and <a href="TextRecognitionSettings.html">TextRecognitionSettings</a>&#39;s <em>textDuplicateFilter</em> options.</p> </div> <dl class="tsd-comment-tags"> <dt data-tag="asmemberof">asmemberof</dt> <dd data-tag="asmemberof"><p>BarcodePicker</p> </dd> </dl> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>scanResult: <a href="ScanResult.html" class="tsd-signature-type" data-tsd-kind="Class">ScanResult</a></h5> <div class="tsd-comment tsd-typography"> <p>The result of the scanning operation on the image.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-event tsd-parent-kind-class tsd-is-static" data-tags="asmemberof "> <a name="scanError" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> scan<wbr>Error</h3> <ul class="tsd-signatures tsd-kind-event tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">scan<wbr>Error<span class="tsd-signature-symbol">(</span>error<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Error</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Fired when an error occurs during scanning initialization and execution. The barcode picker will be automatically paused when this happens.</p> </div> <dl class="tsd-comment-tags"> <dt data-tag="asmemberof">asmemberof</dt> <dd data-tag="asmemberof"><p>BarcodePicker</p> </dd> </dl> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>error: <span class="tsd-signature-type">Error</span></h5> <div class="tsd-comment tsd-typography"> <p>The ScanditEngineError that was triggered.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-event tsd-parent-kind-class tsd-is-static" data-tags="asmemberof "> <a name="submitFrame" class="tsd-anchor"></a> <h3><span class="tsd-flag ts-flagStatic">Static</span> submit<wbr>Frame</h3> <ul class="tsd-signatures tsd-kind-event tsd-parent-kind-class tsd-is-static"> <li class="tsd-signature tsd-kind-icon">submit<wbr>Frame<span class="tsd-signature-symbol">(</span>scanResult<span class="tsd-signature-symbol">: </span><a href="ScanResult.html" class="tsd-signature-type" data-tsd-kind="Class">ScanResult</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Fired when a new frame is submitted to the external Scandit Data Capture library to be processed. As the frame is not processed yet, the <a href="ScanResult.html#barcodes">ScanResult.barcodes</a> property will always be empty (no results yet).</p> </div> <dl class="tsd-comment-tags"> <dt data-tag="asmemberof">asmemberof</dt> <dd data-tag="asmemberof"><p>BarcodePicker</p> </dd> </dl> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>scanResult: <a href="ScanResult.html" class="tsd-signature-type" data-tsd-kind="Class">ScanResult</a></h5> <div class="tsd-comment tsd-typography"> <p>The result of the scanning operation on the image.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> </section> <section class="tsd-panel-group tsd-member-group "> <h2>Methods</h2> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="accessCamera" class="tsd-anchor"></a> <h3>access<wbr>Camera</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">access<wbr>Camera<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="BarcodePicker.html" class="tsd-signature-type" data-tsd-kind="Class">BarcodePicker</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Access the currently set or default camera, requesting user permissions if needed. This method is meant to be used after the picker has been initialized with disabled camera access (<em>accessCamera</em>=false) or after <a href="BarcodePicker.html#pauseScanning">pauseScanning</a> has been called with the pause camera stream option. Calling this doesn&#39;t do anything if the camera is already being accessed.</p> </div> <p>Depending on device features and user permissions for camera access, any of the following errors could be the rejected result of the returned promise:</p> <ul> <li><code>AbortError</code></li> <li><code>NoCameraAvailableError</code></li> <li><code>NotAllowedError</code></li> <li><code>NotFoundError</code></li> <li><code>NotReadableError</code></li> <li><code>SecurityError</code></li> </ul> <p>In Single Image Mode this method has no effect.</p> </div> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="BarcodePicker.html" class="tsd-signature-type" data-tsd-kind="Class">BarcodePicker</a><span class="tsd-signature-symbol">&gt;</span></h4> <p>A promise resolving to the updated <a href="BarcodePicker.html">BarcodePicker</a> object when the camera is accessed.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="addListener" class="tsd-anchor"></a> <h3>add<wbr>Listener</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">add<wbr>Listener<span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EventName</span>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ListenerFn</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span>, once<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BarcodePicker.html" class="tsd-signature-type" data-tsd-kind="Class">BarcodePicker</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p><em>See the <a href="BarcodePicker.html#on">on</a> method.</em></p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>eventName: <span class="tsd-signature-type">EventName</span></h5> <div class="tsd-comment tsd-typography"> <p>The name of the event to listen to.</p> </div> </li> <li> <h5>listener: <span class="tsd-signature-type">ListenerFn</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h5> <div class="tsd-comment tsd-typography"> <p>The listener function.</p> </div> </li> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> once: <span class="tsd-signature-type">boolean</span></h5> <div class="tsd-comment tsd-typography"> <div class="tsd-signature-symbol">Default =&nbsp;false</div> Whether the listener should just be triggered only once and then discarded. </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="BarcodePicker.html" class="tsd-signature-type" data-tsd-kind="Class">BarcodePicker</a></h4> <p>The updated <a href="BarcodePicker.html">BarcodePicker</a> object.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="applyCameraSettings" class="tsd-anchor"></a> <h3>apply<wbr>Camera<wbr>Settings</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">apply<wbr>Camera<wbr>Settings<span class="tsd-signature-symbol">(</span>cameraSettings<span class="tsd-signature-symbol">?: </span><a href="../interfaces/CameraSettings.html" class="tsd-signature-type" data-tsd-kind="Interface">CameraSettings</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="BarcodePicker.html" class="tsd-signature-type" data-tsd-kind="Class">BarcodePicker</a><span class="tsd-signature-symbol">&gt;</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Try to apply new settings to the currently used camera for video input, if no settings are passed the default ones are set.</p> </div> <p>If camera access is enabled, the camera is updated and accessed with the new settings. If not, the camera settings are stored and used for the future initial camera access.</p> <p>Depending on device features and user permissions for camera access, any of the following errors could be the rejected result of the returned promise:</p> <ul> <li><code>AbortError</code></li> <li><code>NoCameraAvailableError</code></li> <li><code>NotAllowedError</code></li> <li><code>NotFoundError</code></li> <li><code>NotReadableError</code></li> <li><code>SecurityError</code></li> </ul> <p>In Single Image Mode this method has no effect.</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5><span class="tsd-flag ts-flagOptional">Optional</span> cameraSettings: <a href="../interfaces/CameraSettings.html" class="tsd-signature-type" data-tsd-kind="Interface">CameraSettings</a></h5> <div class="tsd-comment tsd-typography"> <p>The new camera options used when accessing the camera, by default <code>hd</code> resolution is used.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="BarcodePicker.html" class="tsd-signature-type" data-tsd-kind="Class">BarcodePicker</a><span class="tsd-signature-symbol">&gt;</span></h4> <p>A promise resolving to the updated <a href="BarcodePicker.html">BarcodePicker</a> object when the camera is updated (and accessed, if camera access is currently enabled).</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="applyScanSettings" class="tsd-anchor"></a> <h3>apply<wbr>Scan<wbr>Settings</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">apply<wbr>Scan<wbr>Settings<span class="tsd-signature-symbol">(</span>scanSettings<span class="tsd-signature-symbol">: </span><a href="ScanSettings.html" class="tsd-signature-type" data-tsd-kind="Class">ScanSettings</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BarcodePicker.html" class="tsd-signature-type" data-tsd-kind="Class">BarcodePicker</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Apply a new set of scan settings to the internal scanner (replacing old settings).</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>scanSettings: <a href="ScanSettings.html" class="tsd-signature-type" data-tsd-kind="Class">ScanSettings</a></h5> <div class="tsd-comment tsd-typography"> <p>The scan configuration object to be applied to the scanner.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="BarcodePicker.html" class="tsd-signature-type" data-tsd-kind="Class">BarcodePicker</a></h4> <p>The updated <a href="BarcodePicker.html">BarcodePicker</a> object.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="clearSession" class="tsd-anchor"></a> <h3>clear<wbr>Session</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">clear<wbr>Session<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="BarcodePicker.html" class="tsd-signature-type" data-tsd-kind="Class">BarcodePicker</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Clear the internal scanner session.</p> </div> <p>This removes all recognized barcodes/texts from the scanner session and allows them to be scanned again in case a custom <em>codeDuplicateFilter</em> and/or <em>textDuplicateFilter</em> option was set in <a href="ScanSettings.html">ScanSettings</a> or <a href="TextRecognitionSettings.html">TextRecognitionSettings</a>.</p> </div> <h4 class="tsd-returns-title">Returns <a href="BarcodePicker.html" class="tsd-signature-type" data-tsd-kind="Class">BarcodePicker</a></h4> <p>The updated <a href="BarcodePicker.html">BarcodePicker</a> object.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="createParserForFormat" class="tsd-anchor"></a> <h3>create<wbr>Parser<wbr>For<wbr>Format</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">create<wbr>Parser<wbr>For<wbr>Format<span class="tsd-signature-symbol">(</span>dataFormat<span class="tsd-signature-symbol">: </span><a href="../enums/Parser.DataFormat.html" class="tsd-signature-type" data-tsd-kind="Enumeration">DataFormat</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Parser.html" class="tsd-signature-type" data-tsd-kind="Class">Parser</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Create a new parser object.</p> </div> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>dataFormat: <a href="../enums/Parser.DataFormat.html" class="tsd-signature-type" data-tsd-kind="Enumeration">DataFormat</a></h5> <div class="tsd-comment tsd-typography"> <p>The format of the input data for the parser.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <a href="Parser.html" class="tsd-signature-type" data-tsd-kind="Class">Parser</a></h4> <p>The newly created parser.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="destroy" class="tsd-anchor"></a> <h3>destroy</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">destroy<span class="tsd-signature-symbol">(</span>destroyScanner<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <div class="tsd-comment tsd-typography"> <div class="lead"> <p>Stop scanning and displaying video output, remove HTML elements added to the page, destroy the internal <a href="Scanner.html">Scanner</a> (by default) and destroy the barcode picker itself; ensuring complete cleanup.</p> </div> <p>This method should be called after you don&#39;t plan to use the picker anymore, before the object is automatically cleaned up by JavaScript. The barcode picker must not be used in any way after this call.</p> <p>If the <a href="Scanner.html">Scanner</a> is or will be in use for other purposes, the relative option can be passed to prevent its destruction.</p> </div> <h4 class="tsd-parameters-title">Parameters</h4> <ul class="tsd-parameters"> <li> <h5>destroyScanner: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></h5> <div class="tsd-comment tsd-typography"> <p>Whether to destroy the internally used <a href="Scanner.html">Scanner</a> or not.</p> </div> </li> </ul> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="getActiveCamera" class="tsd-anchor"></a> <h3>get<wbr>Active<wbr>Camera</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">get<wbr>Active<wbr>Camera<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/Camera.html" class="tsd-signature-type" data-tsd-kind="Interface">Camera</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/Camera.html" class="tsd-signature-type" data-tsd-kind="Interface">Camera</a></h4> <p>The currently active camera.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="getScanner" class="tsd-anchor"></a> <h3>get<wbr>Scanner</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">get<wbr>Scanner<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="Scanner.html" class="tsd-signature-type" data-tsd-kind="Class">Scanner</a></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <a href="Scanner.html" class="tsd-signature-type" data-tsd-kind="Class">Scanner</a></h4> <p>The internally used initialized (and possibly configured) <a href="Scanner.html">Scanner</a> object instance.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="isCameraSwitcherEnabled" class="tsd-anchor"></a> <h3>is<wbr>Camera<wbr>Switcher<wbr>Enabled</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">is<wbr>Camera<wbr>Switcher<wbr>Enabled<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> <p>Whether a GUI button to switch between different cameras is shown (when available).</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="isMirrorImageEnabled" class="tsd-anchor"></a> <h3>is<wbr>Mirror<wbr>Image<wbr>Enabled</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">is<wbr>Mirror<wbr>Image<wbr>Enabled<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> <p>Whether the currently selected camera&#39;s video is mirrored along the vertical axis.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="isPinchToZoomEnabled" class="tsd-anchor"></a> <h3>is<wbr>Pinch<wbr>ToZoom<wbr>Enabled</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">is<wbr>Pinch<wbr>ToZoom<wbr>Enabled<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> <p>Whether camera zoom control via pinching gesture on the video is enabled (when available, only Chrome).</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="isPlaySoundOnScanEnabled" class="tsd-anchor"></a> <h3>is<wbr>Play<wbr>Sound<wbr>OnScan<wbr>Enabled</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">is<wbr>Play<wbr>Sound<wbr>OnScan<wbr>Enabled<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> <p>Whether a sound should be played on barcode/text recognition (iOS requires user input). Note that the sound is played if there&#39;s at least a barcode or text not rejected via <a href="ScanResult.html#rejectCode">ScanResult.rejectCode</a> or <a href="ScanResult.html#rejectText">ScanResult.rejectText</a>.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="isReady" class="tsd-anchor"></a> <h3>is<wbr>Ready</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">is<wbr>Ready<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> <p>Whether the barcode picker has loaded the external Scandit Data Capture library and is ready to scan.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="isScanningPaused" class="tsd-anchor"></a> <h3>is<wbr>Scanning<wbr>Paused</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">is<wbr>Scanning<wbr>Paused<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> <p>Whether the scanning is currently paused.</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="isTapToFocusEnabled" class="tsd-anchor"></a> <h3>is<wbr>Tap<wbr>ToFocus<wbr>Enabled</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">is<wbr>Tap<wbr>ToFocus<wbr>Enabled<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> <p>Whether manual camera focus when clicking/tapping on the video is enabled (when available, only Chrome).</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="isTorchToggleEnabled" class="tsd-anchor"></a> <h3>is<wbr>Torch<wbr>Toggle<wbr>Enabled</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">is<wbr>Torch<wbr>Toggle<wbr>Enabled<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> <p>Whether a GUI button to toggle device torch on/off is shown (when available, only Chrome).</p> </li> </ul> </section> <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class" > <a name="isVibrateOnScanEnabled" class="tsd-anchor"></a> <h3>is<wbr>Vibrate<wbr>OnScan<wbr>Enabled</h3> <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"> <li class="tsd-signature tsd-kind-icon">is<wbr>Vibrate<wbr>OnScan<wbr>Enabled<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li> </ul> <ul class="tsd-descriptions"> <li class="tsd-description"> <aside class="tsd-sources"> </aside> <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4> <p>Whether the device should vibrate on barcode/text recognition (only Chrome &amp; Firefox, requires user input). Note that the vibration is triggered if there&#39;s at least a barcode or text not rejected via <a href="ScanResult.html#rejectCode">ScanResult.rejectCode</a> or <a href="ScanResult.html#rejectText">ScanResult.rejectText