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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xbone-3/cordova-zebra-printer

v0.1.1

Published

Zebra Printer Cordova Plugin for iOS and Android, with Bluetooth and Android WiFi/network discovery and printing

Readme

cordova-zebra-printer

A Cordova plugin for Zebra CPCL printers for both iOS and Android with Ionic 3 bindings. This plugin only supports Zebra models that use CPCL printing. Feel free to contribute to this project if you need to support other methods of printing. It has only been tested with Zebra QLn320 printers. Let me know if you use if sucessfully with others.

Also this now requires a minimum of Cordova 9 and cordova-ios 5.0. Current version of link_os_sdk is 1.5.1049

This is a fork of cleversolutions/cordova-zebra-printer that adds Android-only WiFi/network printer discovery and printing alongside the original Bluetooth support. iOS behavior is unchanged.

Get from npm

cordova plugin add @xbone-3/cordova-zebra-printer

or get the latest version from git

cordova plugin add https://github.com/cleversolutions/cordova-zebra-printer.git

To use with Ionic 3

Add the Ionic 3 bindings to your app.module.ts file

import { ZebraPrinter } from '@xbone-3/cordova-zebra-printer/native';
...
providers: [
    ZebraPrinter,
    ...

Then inject the ZebraPrinter into the constructor of the class where you wish to use it for example

constructor(public navCtrl: NavController, protected zebraPrinter:ZebraPrinter) {
    console.log(">>>>>> Home Constructed <<<<<<<")
  }

  protected discover(){
    console.log("Now Discover");
    this.zebraPrinter.discover().then(result => {
      console.log(result);
    }).catch(err => {
      console.error(err);
    });
  }

Discovery: Bluetooth + Android WiFi/network

discover() returns already-bonded Bluetooth devices (iOS and Android) merged with, on Android only, Zebra printers found via network discovery (UDP subnet broadcast). Each entry is tagged with a type field:

interface Printer {
    name: string;
    address: string;      // MAC address for bluetooth, IP address for network
    type: 'bluetooth' | 'network';
    port?: number;        // only present for type === 'network'; the printer's discovered CPCL TCP port (default 6101)
}

Network discovery is Android-only — on iOS, discover() continues to return only bonded Bluetooth devices with no type/port fields.

Connecting: connect(address, type?)

connect() now accepts an optional second argument, the printer type. It defaults to 'bluetooth' so existing single-argument callers keep working unchanged.

// Bluetooth (unchanged, type defaults to 'bluetooth')
this.zebraPrinter.connect(macAddress);

// Network (Android only)
this.zebraPrinter.connect(ipAddress, 'network');

When type === 'network', the plugin connects over TCP using the SDK's default CPCL port (6101). Bluetooth connections are unaffected.

Realtime scanning: scan() / stopScan() (Android only)

discover() waits for the full discovery batch (including the network broadcast timeout) before returning anything. scan() instead streams each printer to you the moment it's found:

this.scanSubscription = this.zebraPrinter.scan().subscribe(
  (printer: Printer) => console.log('found', printer),
  (err) => console.error(err)
);

// later
this.scanSubscription.unsubscribe(); // stops the scan (calls stopScan() for you)

scan()/stopScan() are Android only — the native iOS plugin does not implement them, so the JS bridge rejects the call immediately with an error on iOS instead of hanging.

On Android, scan() streams, in order:

  1. Already-bonded Bluetooth devices — emitted immediately.
  2. Nearby unpaired Bluetooth devices — found live via BluetoothAdapter.startDiscovery().
  3. Network printers — emitted live as they respond to discovery, instead of waiting for the whole batch like discover() does.

Call stopScan() directly (or just unsubscribe from the Observable) to cancel an in-progress scan.

Live Bluetooth scanning needs a runtime permission grant on top of the manifest permissions below — the plugin requests it automatically the first time scan() runs, prompting the user with ACCESS_FINE_LOCATION (Android up to 11) or BLUETOOTH_SCAN/BLUETOOTH_CONNECT (Android 12+). If the user denies it, scan()'s error callback fires and no bluetooth/network scanning happens.

Android permissions

In addition to the existing BLUETOOTH / BLUETOOTH_ADMIN permissions, this plugin now also declares on Android:

  • android.permission.ACCESS_WIFI_STATE
  • android.permission.ACCESS_NETWORK_STATE
  • android.permission.CHANGE_WIFI_MULTICAST_STATE (needed for reliable UDP-broadcast discovery on some OEMs)
  • android.permission.ACCESS_FINE_LOCATION (maxSdkVersion="30") — required by Android up to API 30 to receive results from live Bluetooth discovery, requested at runtime by scan()
  • android.permission.BLUETOOTH_SCAN (neverForLocation) and android.permission.BLUETOOTH_CONNECT — the Android 12+ replacements for the above, also requested at runtime by scan()