Skip to content

Commit 7a4f8be

Browse files
committed
Added retrievePeripheralsByAddress to readme
1 parent 77b0d59 commit 7a4f8be

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

readme.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ This plugin allows you to interact with Bluetooth LE devices on Android, iOS, an
6464
- [isLocationEnabled](#islocationenabled)
6565
- [requestLocation](#requestlocation)
6666
- [setPin](#setPin)
67+
- [retrievePeripheralsByAddress](#retrievePeripheralsByAddress)
6768
- [Peripheral Life Cycle](#peripheral-life-cycle)
6869
- [Initilization](#initilization)
6970
- [Notifications](#notifications)
@@ -1749,6 +1750,38 @@ bluetoothle.requestLocation(requestLocationSuccess, requestLocationError);
17491750

17501751

17511752

1753+
### retrievePeripheralsByAddress ###
1754+
Retrieve paired Bluetooth LE devices based on their address. Wraps the iOS method [CBCentralManager.retrievePeripheralsWithIdentifiers](https://developer.apple.com/documentation/corebluetooth/cbcentralmanager/1519127-retrieveperipheralswithidentifie?language=objc). iOS support only. Will return an error if used on Android.
1755+
1756+
```javascript
1757+
bluetoothle.retrievePeripheralsByAddress(success, error, params);
1758+
```
1759+
1760+
##### Params #####
1761+
* addresses = An arrays of addresses/identifiers to lookup devices by. If no addresses are specified, no devices will be returned
1762+
1763+
```javascript
1764+
{
1765+
"addresses": ["ECC037FD-72AE-AFC5-9213-CA785B3B5C63"]
1766+
}
1767+
```
1768+
1769+
##### Success #####
1770+
Returns an array of device objects:
1771+
* name = the device's display name
1772+
* address = the device's address / identifier for connecting to the object
1773+
1774+
```javascript
1775+
[
1776+
{
1777+
"name": "Polar H7 3B321015",
1778+
"address": "ECC037FD-72AE-AFC5-9213-CA785B3B5C63"
1779+
}
1780+
]
1781+
```
1782+
1783+
1784+
17521785
## Peripheral Life Cycle ##
17531786

17541787
1. initializePeripheral

0 commit comments

Comments
 (0)