Improve docs for isPaired
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
## 0.18.0
|
||||
* Improve docs for isPaired
|
||||
|
||||
## 0.17.0
|
||||
* Fix Windows crash when calling pair APIs with an unknown deviceId
|
||||
* Fix Windows crash when calling startScan again after some time
|
||||
|
||||
@@ -209,7 +209,7 @@ bool? isPaired = await UniversalBle.pair(deviceId); // Returns true if successfu
|
||||
|
||||
// For Apple and Web, you can optionally pass a pairingCommand if you know an encrypted read or write characteristic.
|
||||
// Not supported on Web/Windows
|
||||
UniversalBle.pair(deviceId, pairingCommand: BleCommand(service:"SERVICE", characteristic:"ENCRYPTED_CHARACTERISTIC",));
|
||||
bool? isPaired = UniversalBle.pair(deviceId, pairingCommand: BleCommand(service:"SERVICE", characteristic:"ENCRYPTED_CHARACTERISTIC",));
|
||||
|
||||
// Receive pairing state changes
|
||||
UniversalBle.onPairingStateChange = (String deviceId, bool isPaired) {
|
||||
@@ -221,6 +221,9 @@ UniversalBle.unpair(deviceId);
|
||||
|
||||
// Check current pairing state
|
||||
bool? isPaired = UniversalBle.isPaired(deviceId);
|
||||
|
||||
// For `Apple` and `Web`, you have to pass a "pairingCommand" with an encrypted read or write characteristic.
|
||||
bool? isPaired = await UniversalBle.isPaired(deviceId, pairingCommand: BleCommand(service:"SERVICE", characteristic:"ENCRYPTED_CHARACTERISTIC"));
|
||||
```
|
||||
|
||||
### Bluetooth Availability
|
||||
|
||||
@@ -219,11 +219,10 @@ class UniversalBle {
|
||||
|
||||
/// Check if a device is paired.
|
||||
///
|
||||
/// For Apple and Web, you can optionally pass a pairingCommand if you know an encrypted read or write characteristic.
|
||||
/// It will return true/false if it manages to execute the command.
|
||||
/// For `Apple` and `Web`, you have to pass a "pairingCommand" with an encrypted read or write characteristic.
|
||||
/// Returns true/false if it manages to execute the command.
|
||||
/// Returns null when no `pairingCommand` is passed.
|
||||
/// Note that it will trigger pairing if the device is not already paired.
|
||||
///
|
||||
/// Returns null on `Apple` and `Web` when no `bleCommand` is passed.
|
||||
static Future<bool?> isPaired(
|
||||
String deviceId, {
|
||||
BleCommand? pairingCommand,
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
name: universal_ble
|
||||
description: A cross-platform (Android/iOS/macOS/Windows/Linux/Web) Bluetooth Low Energy (BLE) plugin for Flutter
|
||||
version: 0.17.0
|
||||
version: 0.18.0
|
||||
homepage: https://navideck.com
|
||||
repository: https://github.com/Navideck/universal_ble
|
||||
issue_tracker: https://github.com/Navideck/universal_ble/issues
|
||||
|
||||
Reference in New Issue
Block a user