When to use this skill
ALWAYS use this skill when the user mentions:
- Barcode or QR code scanning in a Tauri app
- Camera permissions for scanning features
- Processing scan results or handling scan errors on mobile
Trigger phrases include:
- "barcode", "QR code", "scanner", "camera permissions", "scan"
How to use this skill
- Install the barcode scanner plugin:
cargo add tauri-plugin-barcode-scanner - Register the plugin in your Tauri builder:
tauri::Builder::default() .plugin(tauri_plugin_barcode_scanner::init()) - Configure capabilities in
src-tauri/capabilities/default.json:{ "permissions": ["barcode-scanner:allow-scan", "barcode-scanner:allow-cancel"] } - Trigger a scan from the frontend:
import { scan, Format } from '@tauri-apps/plugin-barcode-scanner'; const result = await scan({ formats: [Format.QRCode, Format.EAN13] }); console.log('Scanned:', result.content); - Handle permission denial gracefully and prompt the user to enable camera access
- Provide fallback when camera is unavailable (e.g., manual code entry)
Outputs
- Barcode scanner plugin setup with format-specific scanning
- Permission flow with denial handling
- Fallback strategy for unsupported devices
References
- https://v2.tauri.app/plugin/barcode-scanner/
Keywords
tauri barcode scanner, qr code, camera, scan, permissions