はじめに
このプラグインのインストール手順とフルマークダウンガイドを含む設定プロンプトをコピーします。
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 -
デバイス上のDataWedgeを設定
- アプリパッケージに関連付けられたZebra DataWedgeプロファイルを作成または選択
- 有効
Intent Output. - 設定
Intent deliveryに設定Broadcast Intent. - アクションを選択してください
app.capgo.zebra.SCAN.
-
Androidの動作をレビュー
- Androidに関する ノートを読む 生産環境でソフトトリガーを有効にする前に
基本的な設定
「基本的な設定」のセクション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プロファイルと非有効アプリ設定を管理します。ZebraNotificationDataWedgeの通知ブロードキャストに登録します。スキャナーのステータスやプロファイルの切り替えなどZebraQueryアクティブなプロファイル、関連アプリ、スキャナーの状態、スキャナーのリスト、およびバージョン情報を読み取ります。ZebraRuntimeDataWedgeを有効または無効にし、スキャナーを切り替え、スキャンをトリガーします。
プラットフォームスコープ
セクション「プラットフォームスコープ」- Android: DataWedgeがインストールされているゼブラデバイスで完全にサポートされています。
- iOS: DataWedgeはゼブラのAndroid専用であるため利用できません。
- Web: API形状の平面性の範囲を超えて利用できません。