Mulai
Copas prompt pengaturan dengan langkah instalasi dan panduan markdown lengkap untuk plugin ini.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-zebra-datawedge`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/zebra-datawedge/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
-
Jendela terminal
Copy untuk AI bun add @capgo/capacitor-zebra-datawedge -
Sinkronkan platform native
Jendela terminal bunx cap sync android -
Konfigurasi DataWedge pada perangkat
- Buat atau pilih profil DataWedge Zebra yang terkait dengan paket aplikasi Anda.
- Aktifkan
Intent Output. - Atur
Intent deliverykeBroadcast Intent. - Pilih aksi seperti
app.capgo.zebra.SCAN.
-
Tinjau perilaku Android
- Baca Catatan Android sebelum mengaktifkan trigger lembut di produksi.
Pengaturan Dasar
Bagian berjudul โPengaturan Dasarโimport { DataWedgeConfigMode, DataWedgePlugin, ZebraConfiguration, ZebraDataWedge, ZebraRuntime,} from '@capgo/capacitor-zebra-datawedge';
const intentAction = 'app.capgo.zebra.SCAN';
await ZebraConfiguration.setConfig({ profileName: 'CapgoZebraProfile', profileEnabled: true, configMode: DataWedgeConfigMode.CREATE_IF_NOT_EXIST, appList: [ { packageName: 'com.example.app', activityList: ['*'], }, ], pluginConfigs: [ { pluginName: DataWedgePlugin.BARCODE, resetConfig: true, paramList: { scanner_selection: 'auto', scanner_input_enabled: 'true', }, }, { pluginName: DataWedgePlugin.INTENT, resetConfig: true, paramList: { intent_output_enabled: 'true', intent_action: intentAction, intent_delivery: 2, }, }, ],});
await ZebraDataWedge.addListener('scan', (result) => { console.log('Scanned', result.data, result.labelType);});
const result = await ZebraRuntime.softScanTrigger(intentAction);console.log(result.data);Kelompok runtime utama
Bagian berjudul โKelompok runtime utamaโZebraConfigurationmenangani profil dan pengaturan aplikasi yang dinonaktifkan.ZebraNotificationmendaftarkan untuk siaran DataWedge seperti status scanner dan switch profil.ZebraQuerymembaca profil aktif, aplikasi terkait, status scanner, daftar scanner, dan informasi versi.ZebraRuntimemengaktifkan atau menonaktifkan DataWedge, mengganti scanner, dan mengaktifkan skanner.
Lingkup Platform
Lingkup Platform- Android: sepenuhnya didukung pada perangkat Zebra dengan DataWedge terinstal.
- iOS: tidak tersedia karena DataWedge spesifik Android Zebra.
- Web: tidak tersedia di luar kesamaan bentuk API.