コピーするオプション
インストール手順とこのプラグインの完全なマークダウンガイドを含むセットアップ用の質問をコピーする
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.
-
プラグインのインストール
ターミナルウィンドウ bun add @capgo/capacitor-zebra-datawedge -
ネイティブプラットフォームの同期
ターミナルウィンドウ bunx cap sync android -
__CAPGO_KEEP_0__をデバイスに設定する
- __CAPGO_KEEP_1__または、__CAPGO_KEEP_0__に紐づくアプリパッケージに関連付けられたゼブラDataWedgeプロファイルを作成または選択する
- 有効
Intent Output. - 設定
Intent deliveryにBroadcast Intent. - 生産環境でソフトトリガーを有効にする前に、
app.capgo.zebra.SCAN.
-
Androidの動作を確認する
- Androidの注釈を読む 基本設定 「基本設定」のセクション
Configure DataWedge on the device
Create or pick a Zebra DataWedge profile associated with your app package.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);メインランタイムグループ
「メインランタイムグループ」のセクションZebraConfiguration__CAPGO_KEEP_0__プロファイルと無効化アプリ設定を管理します。ZebraNotification__CAPGO_KEEP_0__データウェッジ通知ブロードキャストの登録、スキャナーステータス、プロファイル切り替えなどを行います。ZebraQuery__CAPGO_KEEP_0__アクティブプロファイル、関連アプリ、スキャナーステータス、スキャナーリスト、バージョン情報を読み取ります。ZebraRuntime__CAPGO_KEEP_0__データウェッジを有効または無効にし、スキャナーを切り替え、スキャンをトリガーします。
プラットフォームスコープ
「プラットフォームスコープ」のセクション- Android: DataWedgeがインストールされているZebraデバイスで完全にサポートされています。
- iOS: DataWedgeはZebra Android専用のため利用できません。
- Web: API形状の平面性の範囲内で利用できません。