@capacitor-community/bluetooth-le
Advanced tools
Comparing version 6.0.2 to 6.1.0
@@ -98,2 +98,8 @@ import type { DisplayStrings } from './config'; | ||
/** | ||
* Get a list of currently bonded devices. | ||
* Only available on **Android**. | ||
* Uses [getBondedDevices](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#getBondedDevices()) on Android | ||
*/ | ||
getBondedDevices(): Promise<BleDevice[]>; | ||
/** | ||
* Get a list of currently connected devices. | ||
@@ -250,2 +256,3 @@ * Uses [retrieveConnectedPeripherals](https://developer.apple.com/documentation/corebluetooth/cbcentralmanager/1518924-retrieveconnectedperipherals) on iOS, | ||
getConnectedDevices(services: string[]): Promise<BleDevice[]>; | ||
getBondedDevices(): Promise<BleDevice[]>; | ||
connect(deviceId: string, onDisconnect?: (deviceId: string) => void, options?: TimeoutOptions): Promise<void>; | ||
@@ -252,0 +259,0 @@ createBond(deviceId: string, options?: TimeoutOptions): Promise<void>; |
@@ -142,2 +142,8 @@ import { Capacitor } from '@capacitor/core'; | ||
} | ||
async getBondedDevices() { | ||
return this.queue(async () => { | ||
const result = await BluetoothLe.getBondedDevices(); | ||
return result.devices; | ||
}); | ||
} | ||
async connect(deviceId, onDisconnect, options) { | ||
@@ -144,0 +150,0 @@ await this.queue(async () => { |
@@ -272,2 +272,3 @@ import type { PluginListenerHandle } from '@capacitor/core'; | ||
getConnectedDevices(options: GetConnectedDevicesOptions): Promise<GetDevicesResult>; | ||
getBondedDevices(): Promise<GetDevicesResult>; | ||
addListener(eventName: 'onEnabledChanged', listenerFunc: (result: BooleanResult) => void): Promise<PluginListenerHandle>; | ||
@@ -274,0 +275,0 @@ addListener(eventName: string, listenerFunc: (event: ReadResult) => void): Promise<PluginListenerHandle>; |
@@ -28,2 +28,3 @@ import { WebPlugin } from '@capacitor/core'; | ||
getConnectedDevices(_options: GetConnectedDevicesOptions): Promise<GetDevicesResult>; | ||
getBondedDevices(): Promise<GetDevicesResult>; | ||
connect(options: DeviceIdOptions & TimeoutOptions): Promise<void>; | ||
@@ -30,0 +31,0 @@ private onDisconnectedCallback; |
@@ -134,2 +134,5 @@ import { WebPlugin } from '@capacitor/core'; | ||
} | ||
async getBondedDevices() { | ||
return {}; | ||
} | ||
async connect(options) { | ||
@@ -136,0 +139,0 @@ var _a, _b; |
@@ -305,2 +305,8 @@ 'use strict'; | ||
} | ||
async getBondedDevices() { | ||
return this.queue(async () => { | ||
const result = await BluetoothLe.getBondedDevices(); | ||
return result.devices; | ||
}); | ||
} | ||
async connect(deviceId, onDisconnect, options) { | ||
@@ -649,2 +655,5 @@ await this.queue(async () => { | ||
} | ||
async getBondedDevices() { | ||
return {}; | ||
} | ||
async connect(options) { | ||
@@ -651,0 +660,0 @@ var _a, _b; |
@@ -302,2 +302,8 @@ var capacitorCommunityBluetoothLe = (function (exports, core) { | ||
} | ||
async getBondedDevices() { | ||
return this.queue(async () => { | ||
const result = await BluetoothLe.getBondedDevices(); | ||
return result.devices; | ||
}); | ||
} | ||
async connect(deviceId, onDisconnect, options) { | ||
@@ -646,2 +652,5 @@ await this.queue(async () => { | ||
} | ||
async getBondedDevices() { | ||
return {}; | ||
} | ||
async connect(options) { | ||
@@ -648,0 +657,0 @@ var _a, _b; |
{ | ||
"name": "@capacitor-community/bluetooth-le", | ||
"version": "6.0.2", | ||
"version": "6.1.0", | ||
"description": "Capacitor plugin for Bluetooth Low Energy ", | ||
@@ -5,0 +5,0 @@ "main": "dist/plugin.cjs.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
648514
5337
1144