Skip to content

Instantly share code, notes, and snippets.

@souhe souhe/hardwareAPI.js Secret
Last active Jan 24, 2018

Embed
What would you like to do?
// finding:
LabelPrinter.findPrinter(
'usb',
() => { /* handle printer found */ },
() => { /* handle printer found finish */ },
() => { /* handle printer error */ },
);
// printing:
LabelPrinter.printTest()
.then(() => this.props.navigator.showLocalAlert('Test successful', successAlertStyle))
.catch(() => this.props.navigator.showLocalAlert('Error occurred while printing test', errorAlertStyle))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.