How to enable AR Mode

Basic setup #

To enable AR functionality, please configure the following settings:

                BKDView.SetBarkoderResolution(Plugin.Maui.Barkoder.Enums.BarkoderResolution.FHD);
BKDView.SetDecodingSpeed(Plugin.Maui.Barkoder.Enums.DecodingSpeed.Slow);
BKDView.SetCloseSessionOnResultEnabled(false);
BKDView.SetBarkoderARMode(Plugin.Maui.Barkoder.Enums.BarkoderARMode.InteractiveEnabled); // Or another mode as needed
            

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:

                BKDView.SetARNonSelectedLocationLineColor("HEX"); / Color for selected barcodes
BKDView.SetARSelectedLocationLineColor("HEX"); // Color for non-selected barcodes
            

Show Header Text Above Barcodes #

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

                BKDView.SetBarkoderARHeaderShowMode(Plugin.Maui.Barkoder.Enums.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