사용 방법
- 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
- 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
- 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/yushulx/dynamsoft-sdk-skill --skill capture-vision-mobile시작 전 확인
- 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
- 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.
Capture Vision on mobile
Same router, same templates as web and desktop. The capability is a template string; the platform decides which package you install and who owns the camera.
| Capability | Template |
|---|---|
| Barcodes / QR | ReadBarcodes_Default, ReadSingleBarcode, ReadBarcodes_SpeedFirst, ReadBarcodes_ReadRateFirst |
| Document boundaries | DetectDocumentBoundaries_Default |
| Boundaries + normalization | DetectAndNormalizeDocument_Default |
| MRZ | ReadPassportAndId (ReadPassport, ReadId) |
| Text lines / labels | RecognizeTextLines_Default |
Platforms and packages
| Platform | Artifact |
|---|---|
| Android (Kotlin/Java) | com.dynamsoft:barcodereader 11.6.4000, or com.dynamsoft:capturevision 3.6.4000 |
| iOS (Swift/Obj-C) | SPM: barcode-reader-spm, capture-vision-spm (+ document-normalizer-spm, label-recognizer-spm, code-parser-spm, mrz-scanner-spm) |
| Flutter | flutter_barcode_sdk, Capture Vision Flutter packages, mrz-scanner-mobile-flutter |
| React Native | Capture Vision RN package, mrz-scanner-mobile-react-native |
| .NET MAUI | Dynamsoft.DotNet.BarcodeReader.Bundle, mrz-scanner-mobile-maui |
Take the barcode-only package when the app only scans barcodes; take Capture Vision the moment the same camera session also reads MRZ, documents or labels.
Ready-made scan screens exist per capability — BarcodeScanner, DocumentScanner, MRZScanner. They are RTU components: a preset UI and preset pipeline, little control over ROI, templates, multi-barcode selection or result handling. Use them for a demo only. A custom UX or workflow belongs on the Capture Vision native interfaces (CaptureVisionRouter + templates), not on these components.
License
get_trial_licensewith the product (dcv/dbr/mrz) andpackage: "mobile".status: "login_required"means a browser window opened — ask the user to finish the Google
sign-in, then call again; the session is reused.
- Store the key in a build config, never a source literal: Android
BuildConfigfed from an
uncommitted gradle.properties, iOS xcconfig or plist, Flutter/RN a secrets file. Show only licenseKeyMasked in chat.
get_license_guidewithplatform: "android"(orios,flutter,react-native,maui)
returns the init call.
// Android, Kotlin — Application.onCreate
LicenseManager.initLicense(BuildConfig.DYNAMSOFT_LICENSE_KEY) { isSuccess, error ->
if (!isSuccess) Log.e("Dynamsoft", "license failed: ${error.message}")
}// iOS, Swift — app init
LicenseManager.initLicense(AppConfig.licenseKey, verificationDelegate: nil)Initialise once, before the first router. A router created before licensing fails in ways that look like decode errors.
Camera pipeline
Build these in order, once per screen:
CameraView— preview surface added to the layout.CameraEnhancer— owns the camera session, bound to the view.CaptureVisionRouter— set the enhancer as input, attach a result receiver, start with a template.
// Android, Kotlin
private val cameraView = CameraView(this)
private val cameraEnhancer = CameraEnhancer(cameraView)
private val router = CaptureVisionRouter()
router.setInput(cameraEnhancer)
router.addResultReceiver(object : CapturedResultReceiver() {
override fun onDecodedBarcodesReceived(result: DecodedBarcodesResult) {
for (item in result.items) Log.i("Dynamsoft", "${item.formatString}: ${item.text}")
}
})
router.startCapturing("ReadBarcodes_Default", null)// iOS, Swift
private let cameraView = CameraView()
private let cvr = CaptureVisionRouter()
cvr.setInput(cameraView)
cvr.addResultReceiver(self) // conform to CapturedResultReceiver
cvr.startCapturing("ReadBarcodes_Default", nil)On a phone, ReadBarcodes_SpeedFirst is usually the better default for a live viewfinder.
Per capability
Barcode / QR — the pipeline above; switch templates for speed vs read rate, or use a custom template to restrict symbologies.
MRZ — same pipeline with ReadPassportAndId. Read fields by name from the parsed item (documentNumber, dateOfBirth, dateOfExpiry, …) instead of parsing the raw zone yourself. On mobile the MRZ templates come from the bundled mrz-mobile.json template loaded with initSettingsFromFile(...). The MRZ Scanner mobile SDK is the packaged option when its built-in screen fits; a custom MRZ UX or workflow must use these templates directly.
Document — run DetectDocumentBoundaries_Default while framing, draw the quad as an overlay, and call capture() with DetectAndNormalizeDocument_Default on confirm. Two captures is deliberate: normalizing every frame is expensive.
Labels / text — RecognizeTextLines_Default, combined with Code Parser for typed fields (VIN, GS1 AI, AAMVA).
Platform notes
references/platforms.md has the per-platform detail: Gradle/SPM coordinates, manifest and plist permissions, lifecycle hooks, MAUI handlers, Flutter and React Native entry points, and the permission matrix.
The three failures that break mobile capture most often:
- Missing permission — Android needs
CAMERAin the manifest and a runtime request; iOS needs
NSCameraUsageDescription in Info.plist or the app crashes on first open.
- Lifecycle — release the camera in
onPause/viewWillDisappear; a backgrounded session
returns to a black preview.
- Rotation — rebuild or re-bind the view after a configuration change; a view built for the old
surface renders nothing.
Verify
- License init returns success (log the callback result, do not ignore it).
- Preview renders and
startCapturingreturns no error. - A still image decodes through the same router, isolating camera problems.
- Backgrounding and returning to the screen does not show a black preview.
- Camera permission denial produces a readable message, not a blank screen.
Samples
- Barcode mobile: https://github.com/Dynamsoft/barcode-reader-mobile-samples
- Capture Vision mobile: https://github.com/Dynamsoft/capture-vision-mobile-samples
- Document Normalizer mobile: https://github.com/Dynamsoft/document-normalizer-mobile-samples
- Label Recognizer mobile: https://github.com/Dynamsoft/label-recognizer-mobile-samples
- Code Parser mobile: https://github.com/Dynamsoft/code-parser-mobile-samples
- MRZ mobile: https://github.com/Dynamsoft/mrz-scanner-mobile (+
-flutter,-maui,-react-native) - Camera Enhancer mobile: https://github.com/Dynamsoft/camera-enhancer-mobile-samples