New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

rn-symcode-bt

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


Version published
Weekly downloads
357
decreased by-8.7%
Maintainers
3
Weekly downloads
 
Created

rn-symcode-bt

React native library from Symcode barcodes scaner (SPP protocol)

Installation

npm install rn-symcode-bt

Usage :

  1. Select SPP mode on scaner: spp_img

  2. Pair your device in standard android bluetooth menu

  3. device name is BarCode Scanner spp

  4. use

import Symcode from "rn-symcode-bt";

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

export 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>;

  disconnect(): Promise<void>;

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

  disableNotify(): Promise<void>;
}

License

MIT

FAQs

Package last updated on 28 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