React Native
Props
v3.0.0 Breaking Change: The VisionSdkView component has been removed. Use VisionCamera instead. See the Release Notes for migration details.
VisionCamera Component Props
The VisionCamera component is the primary camera component for barcode scanning and OCR. It provides a streamlined API without requiring API keys or cloud configuration for basic scanning functionality.
Detection Config Object
Since v3.9.0: these flags now fully stop the underlying native detection work when disabled, instead of just hiding the results. Leaving text, document, or sharpness off when you don't need them reduces unnecessary camera-frame processing and device heat.
VisionCameraRefProps — Imperative Methods Reference
Camera Auto-Start: The camera starts automatically when mounted - you don't need to call start() manually in most cases.
Property Control: Flash, zoom, and camera facing are controlled via props (enableFlash, zoomLevel, cameraFacing), not ref methods. Update the prop values to change these settings dynamically.
Pausing and Resuming Detection
pauseDetection() and resumeDetection() let you temporarily stop all detection work (barcode, text, document, and sharpness) without tearing the camera down:
This is different from calling stop(). pauseDetection() keeps the live preview visible and the camera session active, so resuming is instant, with no camera restart flicker and no permission or session setup work needed again. Use it for short-lived UI states (a loading spinner, a result screen) where you don't want the camera analyzing frames in the background, but don't want to stop the camera entirely either.
While paused:
- None of the detection event callbacks fire (
onRecognitionUpdate,onBarcodeDetected,onBoundingBoxesUpdate,onSharpnessScoreUpdate). - Any bounding boxes or detection indicators currently on screen are cleared immediately.
- Any in-progress price tag detection is cancelled rather than left to finish in the background.
Switching scanMode automatically resumes detection even if it was previously paused, since changing modes rebuilds the underlying native scanner. If your UI has its own pause toggle, resync it to "on" when the user changes scan mode, the same way the example app does.
VisionCore Methods
For camera-independent OCR prediction and logging operations, use the VisionCore module instead of the component ref methods:
- Model Management: Use
VisionCore.downloadModel(),VisionCore.loadOCRModel(), etc. — See Documentation - Headless OCR Prediction: Use
VisionCore.predictWithModule(),VisionCore.predictShippingLabelCloud(), etc. — See Documentation - Data Logging: Use
VisionCore.logItemLabelDataToPx(),VisionCore.logShippingLabelDataToPx()— See Documentation