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

@danushka96/expo-r330-printer

v0.2.2

Published

R330 Printer Module

Downloads

9

Readme

expo-r330-printer

Expo module (React Native / Expo) wrapper for vendor R330 series receipt printer service (Android).
This repo contains the native Android module and a small Expo example app used for testing.

⚠️ This module relies on a vendor Android service that exposes an AIDL interface: recieptservice.com.recieptservice.PrinterInterface. Make sure that service is available on target devices.


Quick install (consumer project)

From a consuming project (React Native / Expo with autolinking enabled):

# If published to npm (replace with actual package name)
npm install expo-r330-printer
# or
yarn add expo-r330-printer

Then rebuild native app:

# For bare React Native
npx react-native run-android

# For Expo (dev client)
npx expo run:android

If you are using the managed Expo client (not a dev client), native modules won't work — you must use a custom dev client or bare workflow.

Usage (JS / TS)

This module exposes a simple API. Example usage in React:

import ExpoR330Printer from "expo-r330-printer";

async function test() {
  try {
    // Bind to the vendor printer service
    await ExpoR330Printer.bind();

    // Print text
    await ExpoR330Printer.printText("Hello from Expo!\n");

    // Print a base64 PNG image (data URI or raw base64)
    await ExpoR330Printer.printBitmapBase64("data:image/png;base64,...");

    // Print raw Epson bytes (send as base64)
    await ExpoR330Printer.printEpsonBase64("<base64-data>");

    // Print barcode / QR
    await ExpoR330Printer.printBarCode("123456", 6, 162, 2);
    await ExpoR330Printer.printQRCode("https://example.com", 4, 3);

    // Text formatting
    await ExpoR330Printer.setAlignment(1); // 0 left,1 center,2 right
    await ExpoR330Printer.setTextSize(24); // number
    await ExpoR330Printer.setTextBold(true);
    await ExpoR330Printer.nextLine(1);

    // Table printing
    await ExpoR330Printer.printTableText(["Item","Qty","Price"], [1,1,1], [1,1,1]);

    // Unbind
    await ExpoR330Printer.unbind();
  } catch (e) {
    console.error("Printer error", e);
  }
}