コンテンツにジャンプ

Getting Started

GitHub

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を選択する場合は、以下のコマンドを実行してプラットフォーム固有の指示を参照してください。

  1. プラグインをインストールする

    ターミナル画面
    bun add @capgo/capacitor-zebra-datawedge
  2. ネイティブプラットフォームを同期する

    ターミナル画面
    bunx cap sync android
  3. デバイス上のDataWedgeを設定する

    • アプリパッケージに関連付けられたZebra DataWedgeプロファイルを作成または選択する
    • 有効にする Intent Output.
    • 設定する Intent deliveryBroadcast Intent.
    • アクションを選択してください app.capgo.zebra.SCAN.
  4. 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 プロファイルと非有効アプリ設定を管理します。
  • ZebraNotification DataWedgeの通知ブロードキャストに登録します。スキャナーのステータスやプロファイルの切り替えなど
  • ZebraQuery アクティブなプロファイル、関連アプリ、スキャナーのステータス、スキャナーのリスト、およびバージョン情報を読み取ります。
  • ZebraRuntime DataWedgeを有効または無効にし、スキャナーを切り替え、スキャンをトリガーします。
  • 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