Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rn-symcode-bt

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-symcode-bt

React native library from Symcode barcodes scaner

  • 0.1.80
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
305
increased by286.08%
Maintainers
3
Weekly downloads
 
Created
Source

rn-symcode-bt

React native library for Symcode barcodes scaner (or others) (SPP protocol)

Installation

npm install rn-symcode-bt

Usage :

  1. Select SPP mode on scaner (for others read documentation of concrete device): spp_img

  2. Pair your device in standard android bluetooth menu (or use methods: serachDevices and pairDevice)

  3. Connect device, use connect or asyncConnectWithTimeout methods

  4. For notify of scan event, use enableNotify

import Symcode from "rn-symcode-bt";

/**
 * Methods:
 */
export declare type Device = Record<'name' | 'mac', string> & Record<'isPaired', boolean>;

export default class SymcodeDriver {
  enableBluetooth(): Promise<boolean>;

  searchDevices(timeout?: number): Promise<Device[]>;

  getPairedDevices(timeout?: number): Promise<Device[]>;

  isPaired(mac: string): Promise<boolean>;

  isConnected(mac: string): Promise<boolean>;

  pairDevice(mac: string): Promise<boolean>;

  connect(mac: string): Promise<boolean>;

  asyncConnectWithTimeout(mac: string): Promise<void>;

  disconnect(): Promise<void>;

  enableNotify(eventFn: (data: Record<'barcode', string>) => Promise<void>): Promise<void>;

  disableNotify(): Promise<void>;
}


License

MIT

Keywords

FAQs

Package last updated on 30 Jun 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc