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

sdk-t6

v0.1.1

Published

React native port for pos t6

Readme

sdk-t6

sdk-t6 is an Expo module for T6 POS device integrations.

It currently provides:

  • Magnetic card reader APIs
  • Customer aid screen (top small screen) APIs

Platform support

  • Android: supported
  • iOS: not supported for hardware APIs (throws platform-not-supported errors)
  • Web: not supported for hardware APIs (throws platform-not-supported errors)
  • Expo Go: not supported (requires native module in a development build)

Installation

npm install sdk-t6

Important: vendor SDK binaries are not bundled

This package intentionally does not publish vendor .jar/.aar files to npm.

For Android hardware features to work, add the vendor JAR manually after install:

  1. Obtain vendor SDK JAR from your device/vendor package.
  2. Copy it to:
    • node_modules/sdk-t6/android/libs/T1_V2_20250826.jar
  3. Rebuild your Android development client.

Android setup checklist

  1. Use a development build (expo run:android), not Expo Go.
  2. Ensure vendor JAR exists under node_modules/sdk-t6/android/libs/.
  3. Rebuild after adding/replacing the JAR.
  4. Run Metro with dev client:
npx expo start --dev-client -c

The module manifest includes required permissions:

  • android.permission.CLOUDPOS_MAGCARD
  • android.permission.CLOUDPOS_MAGCARD_GETTRACKDATA
  • android.permission.CLOUDPOS_EMVL2
  • android.permission.CLOUDPOS_SYSTEMDEV

Quick usage

import SdkT6 from 'sdk-t6';
import type { MagCardEvent } from 'sdk-t6';
import { useEvent } from 'expo';

const event = useEvent(SdkT6, 'onMagCardEvent') as MagCardEvent | undefined;

await SdkT6.magOpenAsync();
const card = await SdkT6.readMagCardAsync(60_000);
await SdkT6.magCloseAsync();

Aid screen example:

await SdkT6.smallScreenWakeAsync();
await SdkT6.smallScreenSetBrightnessAsync(80);
await SdkT6.smallScreenDisplayTextAsync('USD 123.45', 'xlarge', 'center');

API overview

Magnetic card:

  • readMagCardAsync(timeoutMs?)
  • cancelReadMagCardAsync()
  • magOpenAsync()
  • magCloseAsync()
  • magSearchAsync(timeoutMs)
  • magStopSearchAsync()
  • event: onMagCardEvent

Aid screen:

  • smallScreenWakeAsync()
  • smallScreenSleepAsync()
  • smallScreenSetBrightnessAsync(brightness)
  • smallScreenGetBrightnessAsync()
  • smallScreenGetSizeAsync()
  • smallScreenDisplayTextAsync(text, textSize?, displayMode?)
  • smallScreenDisplayImageBase64Async(imageBase64, align?, options?)
  • smallScreenStopAppControlAsync()

Image options (Android):

  • width, height (target image box size in pixels)
  • padding, paddingHorizontal, paddingVertical, paddingLeft, paddingTop, paddingRight, paddingBottom
  • contentFit: contain | cover | fill | none

Module docs

Local example app

From this repository:

cd example
npx expo run:android
npx expo start --dev-client -c

Try these example screens:

  • example/MagnetCardScreen.tsx
  • example/AidScreen.tsx

Troubleshooting

  • ERR_MAG_SERVICE_UNAVAILABLE or ERR_SMALL_SCREEN_SERVICE_UNAVAILABLE:
    • vendor JAR missing, wrong path, or app not rebuilt
  • ERR_MAG_BUSY:
    • another magnetic operation is already active
  • Platform-not-supported error:
    • running on iOS/web or Expo Go

License

MIT