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.
インストール
「インストール」のセクションCapgoの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の動作を確認する
- 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がインストールされているZebraデバイスで完全にサポートされています。
- iOS: DataWedgeはZebra Android固有のため利用できません。
- Web: API形状の平面性の範囲を超えて利用できません。
「Getting Started」から続けてください
「Getting Started」のセクション「Getting Started」を使用している場合 「Getting Started」 ネイティブプラグインの作業を計画する場合、接続してください 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 Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins, and Ionic Enterprise Plugin Alternatives for the product workflow in Ionic Enterprise Plugin Alternatives