npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-zijinutil-aisino

v0.0.27-5

Published

a cordova plugin for aisino device

Downloads

75

Readme

ZijinUtil-PhoneGap-Plugin

该版本插件主要适配航天信息的普通手持机

发布版本的时候请注意: 本分支分布的版本都为“预发布版本”,且以0.0.27开头。

npm version prerelease

npm publish --access=public

代码开发完成后,运行 npm run updatePlugin 发布新版本

建议发布版本前,到npm(https://www.npmjs.com/package/cordova-plugin-zijinutil-aisino) 上面看看本项目的最新版本是多少

插件安装

  1. 使用 git clone 命令将该项目下载到本地
  2. 使用 ionic cordova plugin add <cordova-plugin的路径> 安装插件

插件使用

条码扫描插件功能

1. 开启扫码模块,通过侧边按键方式触发扫码,并监听扫码返回的结果


 zijinUtil.openScanReceiver().subscribe(barcode => {
            console.log(`扫码结果:${barcode}`);
        }, err => {
            console.log(`扫码失败:${err}`);
        });

2. 通过代码调用方式触发扫码,并监听扫码返回的结果

zijinUtil.scanBarcode().then(barcode => {
            console.log(`扫码结果:${barcode}`);
        }).catch(err => {
            console.log(`扫码失败:${err}`);
        });

3. 关闭条码扫描模块,并取消对扫码返回结果的监听

zijinUtil.closeScanReceiver();

UHF超高频电子标签扫描插件功能

1. 初始化UHF扫描模块

zijinUtil.openUHF().then(result => {
        // UHF 模块开启成功
    }).catch(err => {
        // UHF 模块开启失败
    });

2. 设置读标签的功率(功率范围:500~3000)

zijinUtil.setOutputPower(2800).then(result => {
        // 标签读取功率设置成功
    }).catch(err => {
        // 标签读取功率设置失败
    });

3. 开始盘点

zijinUtil.startInventoryReal().subscribe(epc => {
      // epc的值为json数组,数据格式为:['AB001354','AB001355',...]
            console.log(epc);
        }, err => {
            console.log(err);
        });

4. 关闭UHF模块

zijinUtil.closeUHF();

以上 1-4 步为插件使用的基本流程。注意应当根据具体业务的应用场景来设置 UHF 的读取功率,以控制设备对 UHF 电子标签的读取距离。

注意

  1. 在 Ionic 中使用本插件时,应根据 Angular 组件的生命周期方法,在不需要使用插件功能时应及时进行插件的关闭和资源释放。以减少设备不必要的电量消耗。
  2. 在新增的应用内版本升级的功能中由于使用了自定义的Dialog布局,需要通过R类去索引资源的路径。插件中R类引入的路径为ionic默认创建时的包名称(io.ionic.starter),如果在发布apk时有修改包名的业务需求,则需同步修改平台代码(platforms/android)下的AppUpdatePlugin.java所引入R类的路径地址。
    import io.ionic.starter.R;