내용으로 건너뛰기

안드로이드 동작

GitHub

Intent 출력이 필요합니다

Intent 출력이 필요합니다

Android 방송을 통해 스캔 결과를 감지하는 플러그인이 있습니다. Zebra DataWedge 프로필은 다음을 수행해야합니다:

  • 앱 패키지와 연관
  • 활성화 Intent Output
  • 사용 Broadcast Intent 배달
  • 전송 softScanTrigger()

스캔 결과를 동일한 액션으로 전송해야합니다. 그 액션은 Capacitor에 전달해야합니다.

Capacitor에 구독 scan listener to receive decoded data:

import { ZebraDataWedge } from '@capgo/capacitor-zebra-datawedge';
await ZebraDataWedge.addListener('scan', (event) => {
console.log(event.data);
console.log(event.labelType);
console.log(event.source);
});

softScanTrigger(intentAction) 다음 스캔 브로드캐스트가 제공된 액션에서 기다리고 그(decoded payload)로 해결됩니다.

사용 ZebraNotification.registerForNotification() 자연스럽게 스캔 상태 또는 프로필 Switch 업데이트가 필요할 때:

import {
DataWedgeNotificationType,
ZebraNotification,
} from '@capgo/capacitor-zebra-datawedge';
await ZebraNotification.registerForNotification({
notificationType: DataWedgeNotificationType.SCANNER_STATUS,
callback: (event) => {
console.log(event.scannerStatus);
},
});
  • Zebra의 DataWedge 명령은 Zebra의 패키지를 포함하고 활성화해야 합니다. com.symbol.datawedge package to be present and enabled.
  • softRfidTrigger() uses the first registered scan intent action. __CAPGO_KEEP_0__를 사용하기 전에 하나를 등록하세요.
  • Keep one canonical intent action per scanning flow. 스캔 흐름당 하나의 canonical intent action을 유지하세요. 그럼 DataWedge profile과 앱 리스너 간의 불일치가 줄어듭니다.

Keep going from Android Behavior

Android Behavior를 계속 사용하세요.

If you are using Android Behavior를 사용 중이라면 Android Behavior Using @capgo/capacitor-zebra-datawedge 자연 플러그인 작업을 계획하기 위해 capgo/capacitor-zebra-datawedge를 연결하세요. for the native capability in Using @Capgo/__CAPGO_KEEP_1__-zebra-datawedge 자연 플러그인 기능을 사용하기 위해 Using @Capgo/__CAPGO_KEEP_1__-zebra-datawedge를 사용하세요. Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo, __CAPGO_KEEP_1__ 플러그인들을 추가하거나 업데이트 하기 __CAPGO_KEEP_0__ 플러그인들의 구현 세부 사항에 대해, 플러그인들을 추가하거나 업데이트 하기, Ionic Enterprise 플러그인 대체 __CAPGO_KEEP_0__ 플러그인들의 제품 워크플로에 대해 Ionic Enterprise 플러그인 대체.