Expo native module for Epson TM ESC/POS printers.
Discovery is available through PrintersDiscovery and usePrintersDiscovery.
Printer sessions and printing are not implemented yet.
Add the package to the Expo app's plugins array, rebuild the development
client, then request permission before starting Discovery:
import {
PrintersDiscovery,
getDiscoveryPermissions,
requestDiscoveryPermissions,
} from '@countertek/react-native-esc-pos-printer';
const current = await getDiscoveryPermissions();
if (!current.granted) {
await requestDiscoveryPermissions();
}
PrintersDiscovery.start();Subscribe with PrintersDiscovery.onDiscovery, onStatusChange, and onError,
or use usePrintersDiscovery for React state. granted reports Bluetooth;
start Discovery even when it is false so LAN and USB printers can still be
found. The config plugin writes the required Bluetooth, local-network, and
external-accessory permission entries.
- v0.1 development specification
- Architecture decisions
- Legacy 4.x documentation for the unscoped package
Install the library dependencies:
pnpm installInstall and run the Expo SDK 56 example:
cd example
pnpm install
pnpm ios
# or
pnpm androidThe example uses Expo Router and a development client. Expo Go is not supported because this package contains native modules.
MIT