On this page

Stuck? Open a support ticket and the barKoder team will help. Open a ticket

NativeScript Continuous scanning

What is Continuous Scanning for Android? #

Continuous Scanning is a feature in barcode scanning applications that allows for repeated scanning of barcodes without manually restarting the scanning process after each successful scan. It is implemented by configuring the scanner to keep the session open and adjusting the delay between duplicate scans.

How to enable continuous scanning? #

To enable continuous scanning, add the following code:

TypeScript
this.barkoderView.setCloseSessionOnResultEnabled(false)
this.barkoderView.setThresholdBetweenDuplicatesScans(0) // it can take values -1, or n > 0

Duplicate Scan Control #

The thresholdBetweenDuplicatesScans property controls how repeated barcode detections are handled

You set it like this:

TypeScript
this.barkoderView.setThresholdBetweenDuplicatesScans(0) // it can take values -1, or n > 0
ValueBehavior
-1Ignores duplicates completely — each barcode is scanned only once.
0Allows scanning the same barcode continuously, with no delay between scans.
n > 0Allows scanning the same barcode again only after n seconds.