BLEDevice
A connected device that talks to the phone over Bluetooth Low Energy (BLE).
Holds the scan settings used to find the device. Its registration is a BLEDeviceRegistration. Extend it for a specific BLE device, like BLEHeartRateDevice.
- Inheritance
-
- Object
- Serializable
- DeviceConfiguration<
TRegistration> - CamsDevice<
TRegistration> - BLEDevice
- Implementers
- Annotations
-
- @JsonSerializable(includeIfNull: false, explicitToJson: true)
Constructors
BLEDevice.fromJson
BLEDevice
Properties
allowDuplicates
Whether to receive repeated scan results for the same device. Useful for RSSI updates. Default is true.
fromJsonFunction
The function which can convert a JSON string to an object of this type.
minRssi
Minimum RSSI (dBm) to accept, for example: -80.
namePrefix
Optional device name filter (substring match, case-insensitive). Applied AFTER discovery, not at the BLE controller level.
serviceUuids
Advertised service UUIDs to filter for. Empty means no filter.
UUIDs as strings, for example: "0000180D-0000-1000-8000-00805f9b34fb".
timeout
Scan timeout. If null, the scan has no timeout.
Methods
toJson
Return a JSON encoding of this object.