How to reduce the barcode formats

By default, the Barcode scanner SDK allows all the barcode formats. If you need to exclude some barcode formats or you only want to support a specific one (reducing the number of supported formats will make the barcode scanner faster), you need to:

  1. Create a class that implements GetGmsBarcodeScannerOptions.
  2. On the invoke() method, specify the supported barcode formats using GmsBarcodeScannerOptions.Builder().setBarcodeFormats().
  3. Provide your new implementation via Koin replacing the default SDK implementation.