How to enable AR Mode

Basic setup #

To enable AR functionality, please configure the following settings:

                Barkoder.setCameraResolution(Barkoder.constants.CameraResolution.FHD);
Barkoder.setDecodingSpeed(Barkoder.constants.DecodingSpeed.Slow);
Barkoder.setContinuous(true);
Barkoder.setARMode(Barkoder.constants.BarkoderARMode.InteractiveEnabled);
            

AR Modes Available #

You can choose between the following modes based on your use case:

  • InteractiveDisabled - AR is enabled, but new barcodes are not selected automatically by default.
  • InteractiveEnabled - AR is enabled, and new barcodes are automatically selected.
  • NonInteractive - AR is enabled with non-interactive behavior; selection happens automatically without user interactions.

Customize Overlay Colors #

To visually indicate whether a barcode is selected or not:

                Barkoder.setSelectedLocationColor("#00FF00");
Barkoder.setNonSelectedLocationLineColor("#FF0000");
            

Show Header Text Above Barcodes #

You can control when barcode header text (label) is displayed:

                Barkoder.setHeaderShowMode(Barkoder.constants.BarkoderARHeaderShowMode.ONSELECTED);
            

Options include:

  • NEVER - Never display the header text.
  • ALWAYS - Always display the header above detected barcodes.
  • ONSELECTED - Display the header only when the barcode is selected.
With this setup, you'll be able to draw boxes and display the barcode status directly on the camera preview!

Page Contents