Skip to content

Instantly share code, notes, and snippets.

@souhe
Last active August 15, 2021 09:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save souhe/72646bda510f8546a2282e11b28150eb to your computer and use it in GitHub Desktop.
Save souhe/72646bda510f8546a2282e11b28150eb to your computer and use it in GitHub Desktop.
// 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