Table of contents
Swift
Objective-C

Improve the Performance of BarcodeScanner

Using a template file is the quickest way to improve the performance of BarcodeScanner. A template file is a JSON file (or JSON string) that includes a series of algorithm parameter settings. Contact us to get a customized template for your scanner.

  1. Add a Templates folder to the assets folder of your project at src\main\assets\Templates. Put your JSON file in the Templates folder. Here we use a ReadQRCode.json file as an example.

    initSettings

  2. Specify the template file via setTemplateFile

    • Java
    • Kotlin
    1.  BarcodeScannerConfig config = new BarcodeScannerConfig();
       config.setTemplateFile("ReadQRCodes.json");
      
    2.  val config = BarcodeScannerConfig().apply {
      templateFile = "ReadQRCodes.json"
       }
      

Related APIs

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: