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

@systemic-games/react-native-bluetooth-le

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@systemic-games/react-native-bluetooth-le

React Native package adding support for Bluetooth LE.

  • 1.2.0-beta.3
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-bluetooth-le

React Native package adding support for Bluetooth LE.

Installation

npm install @systemic-games/react-native-bluetooth-le

Usage

import { Central } from '@systemic-games/react-native-bluetooth-le';

// Initialize once
await Central.initialize();

// ...

// Scan for peripherals
Central.addListener("scannedPeripheral", (ev) => {
  // Filter connectable peripherals with a name
  if (
    ev.peripheral.name.length &&
    ev.peripheral.advertisementData.isConnectable
  ) {
    console.log(`Found connectable peripheral ${ev.peripheral.name}`);
  }
});
Central.startScanning();


// ...

// Connect to a peripheral
const connectionStatusCallback = (ev: PeripheralConnectionEvent) => {
  console.log(
    `Peripheral ${ev.peripheral.name} connection status changed to ${ev.connectionStatus}`
  );
};
Central.connectPeripheral(p, {  connectionStatusCallback });

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Keywords

FAQs

Package last updated on 23 Jun 2023

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