使用@capgo/capacitor-zebra-datawedge
Capacitor为Zebra DataWedge配置管理、通知、查询和Zebra Android设备上的软扫描提供插件
安装
bun add @capgo/capacitor-zebra-datawedge
bunx cap sync
bunx cap sync 将插件的本机code复制到您的本机项目中。每次升级插件后,请再次运行它。
导入
import { ZebraDataWedge } from '@capgo/capacitor-zebra-datawedge';
API概览
| 方法 | 描述 |
|---|---|
cloneProfile |
查看源定义以了解当前行为 |
createProfile |
查看源定义以了解当前行为 |
deleteProfile |
查看源定义以了解当前行为 |
importConfig |
查看源定义以了解当前行为 |
renameProfile |
查看源定义以了解当前行为 |
restoreConfig |
查看源定义以了解当前行为 |
setConfig |
查看源定义以了解当前行为 |
setDisabledAppList |
查看源定义以了解当前行为 |
setIgnoreDisabledProfiles |
查看当前行为的源定义。 |
registerForNotification |
查看当前行为的源定义。 |
unRegisterForNotification |
查看当前行为的源定义。 |
enumerateScanners |
查看当前行为的源定义。 |
getActiveProfile |
查看当前行为的源定义。 |
getAssociatedApps |
查看当前行为的源定义。 |
getConfig |
查看当前行为的源定义。 |
getDatawedgeStatus |
查看当前行为的源定义。 |
getDisabledAppList |
查看当前行为的源定义。 |
getIgnoreDisabledProfiles |
查看当前行为的源定义。 |
getProfilesList |
查看当前行为的源定义。 |
getScannerStatus |
查看当前行为的源定义。 |
getVersionInfo |
查看当前行为的源定义。 |
disableDatawedge |
查看当前行为的源定义。 |
disableScannerInput |
查看当前行为的源定义。 |
enableDatawedge |
查看当前行为的源定义。 |
enableScannerInput |
查看当前行为的源定义。 |
enumerateTriggers |
查看当前行为的源定义。 |
notify |
查看当前行为的源定义。 |
resetDefaultProfile |
查看当前行为的源定义。 |
setDefaultProfile |
查看当前行为的源定义。 |
setReportingOptions |
查看当前行为的源定义。 |
softRfidTrigger |
查看当前行为的源定义。 |
softScanTrigger |
查看当前行为的源定义。 |
switchScanner |
查看当前行为的源定义。 |
switchScannerParams |
查看当前行为的源定义。 |
switchToProfile |
查看当前行为的源定义。 |
示例
cloneProfile()
查看当前协议的API参考。
import { ZebraDataWedge } from '@capgo/capacitor-zebra-datawedge';
await ZebraDataWedge.cloneProfile({
destProfileName: 'dest-profile',
sourceProfileName: 'source-profile',
});
createProfile()
查看当前协议的API参考。
import { ZebraDataWedge } from '@capgo/capacitor-zebra-datawedge';
await ZebraDataWedge.createProfile({ profileName: 'profile' });
deleteProfile()
查看当前协议的API参考。
import { ZebraDataWedge } from '@capgo/capacitor-zebra-datawedge';
await ZebraDataWedge.deleteProfile({ profileNames: ['profile'] });
importConfig()
查看当前协议的API参考。
import { ZebraDataWedge } from '@capgo/capacitor-zebra-datawedge';
await ZebraDataWedge.importConfig({ folderPath: 'path/to/file' });
renameProfile()
查看当前协议的API参考。
import { ZebraDataWedge } from '@capgo/capacitor-zebra-datawedge';
await ZebraDataWedge.renameProfile({
currentProfileName: 'current-profile',
newProfileName: 'new-profile',
});
restoreConfig()
查看当前协议的API参考。
import { ZebraDataWedge } from '@capgo/capacitor-zebra-datawedge';
await ZebraDataWedge.restoreConfig();
上表列出了35个核心方法。监听器和版本辅助函数,以及每个方法的完整协议,均在 GitHub仓库.
监听事件
addListener 返回句柄。调用 handle.remove() 当屏幕卸载时。
完整参考
继续使用 @capgo/capacitor-zebra-datawedge
如果您正在使用 使用 @capgo/capacitor-zebra-datawedge 以规划原生插件工作,连接它与 @Capacitor-capgo/capacitor-zebra-datawedge 为 @capgo/capacitor-zebra-datawedge 的实现细节 开始使用 为开始使用的实现细节 Capgo 插件目录 为 Capgo 插件目录中的产品工作流程 Capacitor 由 Capgo 提供的插件 为 Capacitor 由 Capgo 提供的插件的实现细节,并且 添加或更新插件 为添加或更新插件的实现细节