Skip to content

Latest commit

 

History

History

README.md

📦 Scan Single Barcode - Capacitor

This sample demonstrates how to use the BarcodeScanner API from the Dynamsoft Barcode Reader JavaScript SDK in a Capacitor app to scan a single barcode using the camera.

We use typescript and rollup inside capacitor for demonstration. You can use any framework you like, or even vanilla javascript.

✨ Features

  • Easy integration with pre-built UI
  • Renders barcodeScanner inside a Capacitor container
  • Scans one barcode at a time from video

🚀 Quick Start

npm install
npm run build
npx cap sync

Then build your app in Android Studio and Xcode.

👓 Camera Permission

Notice we add camera permission in AndroidManifest.xml and Info.plist.

android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.CAMERA" />

ios/App/App/Info.plist:

<key>NSCameraUsageDescription</key>
<string>Decoding barcodes from video needs to access your camera.</string>

📌 Customization

Please check the official documentation.

📄 Support

If you have any questions, feel free to contact Dynamsoft Support.