__CAPGO_KEEP_1__

Getting Started

GitHub

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の動作を確認

    • 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);
  • ZebraConfiguration プロファイルと非有効アプリ設定の管理を行います。
  • ZebraNotification DataWedgeの通知ブロードキャストの登録(スキャナーのステータスやプロファイルの切り替えなど)を行います。
  • ZebraQuery アクティブなプロファイル、関連アプリ、スキャナーのステータス、スキャナーのリスト、バージョン情報を読み取ります。
  • ZebraRuntime DataWedgeの有効/無効、スキャナーの切り替え、スキャンのトリガーを行います。
  • 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 プラグイン代替の製品ワークフローについて。