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.
-
Pasang plugin
Jendela Terminal 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”
Konfigurasi DataWedge pada perangkatimport { 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
Judul bagian “Kelompok runtime utama”ZebraConfigurationmenangani profil dan pengaturan aplikasi yang dinonaktifkan.ZebraNotificationmendaftarkan untuk siaran pemberitahuan DataWedge seperti status scanner dan perubahan profil.ZebraQuerymembaca profil aktif, aplikasi terkait, status scanner, daftar scanner, dan informasi versi.ZebraRuntimemengaktifkan atau menonaktifkan DataWedge, mengubah scanner, dan mengaktifkan scan.
Lingkup platform
Judul bagian “Lingkup platform”- Android: sepenuhnya didukung pada perangkat Zebra dengan DataWedge terinstal.
- iOS: tidak tersedia karena DataWedge adalah spesifik Android Zebra.
- Web: tidak tersedia di luar kesamaan bentuk API.