Socket
Socket
Sign inDemoInstall

barcode-scanner-status

Package Overview
Dependencies
0
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    barcode-scanner-status

Detect if a Barcode Scanner (or external keyboard) is connected to iOS device


Version published
Weekly downloads
7
Maintainers
1
Install size
4.97 kB
Created
Weekly downloads
 

Readme

Source

MIT license

Barcode Scanner Status

Detect if a Barcode Scanner (or external keyboard) is connected to iOS device

Installation

You need to have Cordova Keyboard Plugin, in order to use this package.

npm i cordova-plugin-keyboard
npm i barcode-scanner-status

import brcScannerStatus from "barcode-scanner-status";

iOS Quirks

Add this line in your config.xml in order to enable .focus();

<preference name="KeyboardDisplayRequiresUserAction" value="false" />

Methods

checkForScanner(delay)

Returns scanner status after delay, which by default is 5ms.

brcScannerStatus.checkForScanner().then((scannerConnected) => {
	console.log(scannerConnected);
});
destroy()

Destroy eventListener for scanner status

brcScannerStatus.destroy();

Keywords

FAQs

Last updated on 22 Nov 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc