Socket
Socket
Sign inDemoInstall

@e-is/capacitor-bluetooth-serial

Package Overview
Dependencies
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@e-is/capacitor-bluetooth-serial - npm Package Compare versions

Comparing version 0.0.5-rc15 to 0.0.5-rc16

6

dist/docs.json

@@ -258,3 +258,3 @@ {

"name": "addListener",
"signature": "(eventName: 'subscribe', listenerFunc: (result: BluetoothReadResult) => void) => PluginListenerHandle",
"signature": "(eventName: 'onRead', listenerFunc: (result: BluetoothReadResult) => void) => PluginListenerHandle",
"parameters": [

@@ -264,3 +264,3 @@ {

"docs": "",
"type": "'subscribe'"
"type": "'onRead'"
},

@@ -285,3 +285,3 @@ {

],
"slug": "addlistenersubscribe"
"slug": "addlisteneronread"
},

@@ -288,0 +288,0 @@ {

@@ -34,3 +34,3 @@ import { PluginListenerHandle } from "@capacitor/core";

*/
addListener(eventName: 'subscribe', listenerFunc: (result: BluetoothReadResult) => void): PluginListenerHandle;
addListener(eventName: 'onRead', listenerFunc: (result: BluetoothReadResult) => void): PluginListenerHandle;
/**

@@ -37,0 +37,0 @@ * Listen for bluetooth state changed

{
"name": "@e-is/capacitor-bluetooth-serial",
"version": "0.0.5-rc15",
"version": "0.0.5-rc16",
"description": "Capacitor Bluetooth Serial Plugin",

@@ -5,0 +5,0 @@ "main": "dist/plugin.cjs.js",

@@ -72,4 +72,4 @@ # Capacitor Bluetooth Serial Plugin

.then((response: BluetoothState) => {
const message = response.enabled ? 'enabled' : 'disabled';
console.log(`Bluetooth is ${message}`);
const status = response.enabled ? 'enabled' : 'disabled';
console.log(`Bluetooth is ${status}`);
})

@@ -103,4 +103,4 @@ .catch(() => {

.then((response: BluetoothState) => {
const message = response.enabled ? 'enabled' : 'disabled';
console.log(`Bluetooth is ${message}`);
const status = response.enabled ? 'enabled' : 'disabled';
console.log(`Bluetooth is ${status}`);
})

@@ -137,4 +137,4 @@ .catch(() => {

.then((response: BluetoothState) => {
const message = response.enabled ? 'enabled' : 'disabled';
console.log(`Bluetooth is ${message}`);
const status = response.enabled ? 'enabled' : 'disabled';
console.log(`Bluetooth is ${status}`);
})

@@ -398,6 +398,6 @@ .catch(() => {

Function `startNotifications` enable notifications. The success callback will return an event name. In order to retrieve the values, one has to use an Event Listener with the returned event name.
Function `startNotifications` enable notifications. The success callback will return an event name. In order to retrieve the values, use an Event Listener with 'onRead' as event name.
``` typescript
const listener = BluetoothSerial.addListener('subscribe' , (response: BluetoothReadResult) => {
const listener = BluetoothSerial.addListener('onRead' , (response: BluetoothReadResult) => {

@@ -423,3 +423,3 @@ const { value } = response;

.then((result: BluetoothEnableNotificationsResult) => {
event = BluetoothSerial.addListener(result.eventName, (data: BluetoothReadResult) => {
removeListenerFunc = BluetoothSerial.addListener('onRead', (data: BluetoothReadResult) => {
console.log(data.value);

@@ -426,0 +426,0 @@ });

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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