Choose a Viewfinder
A viewfinder shows the user where to aim the camera. By default, the Barcode Capture overlay has no viewfinder.
Examples shown on iOS.
Aimer
The central dot helps the user aim at one barcode among several on a shelf.
Rectangular
The frame shows the user where to position the barcode. You can adjust its size and choose square or rounded corners.
Laserline
The horizontal line helps the user align a barcode as they would with a handheld scanner.
Check Framework Availability
| Frameworks | Built-in viewfinders |
|---|---|
| Android, iOS, Web, Flutter, React Native, Capacitor, Cordova | Aimer, Rectangular, Laserline |
| Kotlin Multiplatform, Titanium, .NET for iOS, .NET for Android | Aimer, Rectangular |
| Linux (C API) | None. Your application provides the scanning UI. |
Restrict the Scan Area
The viewfinder guides the user in the camera preview. To restrict the scan area, configure location selection.
For the Aimer, use radius location selection. Barcode Capture can return any barcode that intersects the circle around the point of interest. For a rectangular viewfinder, use rectangular location selection with the same dimensions as the frame.
See Radius Location Selection and Rectangular Location Selection for configuration options.
Add an Aimer to the Overlay
After creating the overlay in Get Started, assign an Aimer to it.
overlay.viewfinder = new ScanditCore.AimerViewfinder();
See the Viewfinder API reference for the available types and their settings.