How can I use AVCaptureSession, CameraX or third-party camera modules with Dynamsoft Barcode Reader - Android?
Android
CameraX
If you are using the CameraX, you can view HelloWorld/DecodeWithCamerX sample for a quick start.
Third-Party Camera Module
If you are using a third-party camera module, what you have to do is:
- Create a class that extends ImageSourceAdapter. In this class, you need to implement the video capture features and the
getImagemethod of ImageSourceAdapter. - Create an instance of your camera class.
- Create an instance of the CaptureVisionRouter class. Then trigger the
setInputmethod with the instance of your camera class as the parameter. - Trigger the
startCapturingmethod to start the barcode decoding.
iOS
AVCaptureSession
If you are using the CameraX, you can view HelloWorld/DecodeWithAVCaptureSession sample for a quick start.
Third-Party Camera Module
If you are using a third-party camera module, what you have to do is:
- Create a class that extends DSImageSourceAdapter. In this class, you need to implement the video capture features and the
getImagemethod of DSImageSourceAdapter. - Create an instance of your camera class.
- Create an instance of the DSCaptureVisionRouter class. Then trigger the
setInputmethod with the instance of your camera class as the parameter. - Trigger the
startCapturingmethod to start the barcode decoding.