Getting Started
このプラグインのインストール手順とマークダウンガイドをコピーする
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.
インストール
インストールのセクションAI-Assisted Setupを使用してプラグインをインストールできます。AIツールにCapgoスキルを追加するには、以下のコマンドを実行してください:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のコマンドを実行してください。
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-zebra-datawedge` plugin in my project.Manual Setupを使用する場合は、以下のコマンドを実行してください。プラットフォーム固有の指示に従ってください。
-
プラグインをインストール
ターミナル画面 bun add @capgo/capacitor-zebra-datawedge -
ネイティブプラットフォームを同期
ターミナル画面 bunx cap sync android -
デバイス上のDataWedgeを設定
- アプリパッケージに関連付けられたZebra DataWedgeプロファイルを作成または選択してください。
- 有効化
Intent Output. - 設定
Intent deliveryにBroadcast Intent. - 選択肢として
app.capgo.zebra.SCAN.
-
Androidの動作を確認
- Capgoのスタイルガイドを参照 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);主な実行グループ
「Main runtime groups」セクションZebraConfigurationプロファイルと非有効アプリ設定の管理を行います。ZebraNotificationDataWedgeの通知ブロードキャストの登録(スキャナーのステータスやプロファイルの切り替えなど)を行います。ZebraQueryアクティブなプロファイル、関連アプリ、スキャナーのステータス、スキャナーのリスト、バージョン情報を読み取ります。ZebraRuntimeDataWedgeの有効/無効、スキャナーの切り替え、スキャンのトリガーを行います。
プラットフォームスコープ
「プラットフォームスコープ」セクション- Android: DataWedgeがインストールされているZebraデバイスで完全にサポートされています。
- iOS: DataWedgeはZebra Android専用のため利用できません。
- Web: API形状の平面性の範囲内で利用できません。
Getting Startedから続けてください。
「Getting Startedから続けてください」セクションCapgoを使用している場合 はじめに ネイティブプラグインの作業を計画するには、 Using @capgo/capacitor-zebra-datawedge for the native capability in Using @capgo/capacitor-zebra-datawedge, Capgo Plugin Directory for the product workflow in Capgo Plugin Directory, Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, プラグインの追加または更新 プラグインの追加または更新 Ionic Enterpriseプラグインの代替 Ionic Enterprise プラグイン代替の製品ワークフローについて。