BleDevice

data class BleDevice(val deviceInfo: BluetoothDevice?, val deviceName: String?, val deviceAddress: String?, val rssi: Int?, val scanRecord: ByteArray?, val serviceUuids: List<ParcelUuid>? = null) : Parcelable

Bluetooth Low Energy (BLE) device. This class holds various properties related to a discovered BLE device, including its basic information (name, address), signal strength (RSSI), scan record, and service UUIDs. The class also implements Parcelable, making it possible to pass BleDevice instances between Android components (e.g., via Intents).

Constructors

Link copied to clipboard
constructor(parcel: Parcel)
constructor(parcel: Parcel, tag: Int)
constructor(deviceInfo: BluetoothDevice?, deviceName: String?, deviceAddress: String?, rssi: Int?, scanRecord: ByteArray?, serviceUuids: List<ParcelUuid>? = null)

Types

Link copied to clipboard
object CREATOR : Parcelable.Creator<BleDevice>

Properties

Link copied to clipboard

The unique address of the BLE device.

Link copied to clipboard
val deviceInfo: BluetoothDevice?

The Bluetooth device information

Link copied to clipboard

The name of the BLE device

Link copied to clipboard
val rssi: Int?

The Received Signal Strength Indicator (RSSI) value of the device

Link copied to clipboard

The raw advertising data from the BLE device

Link copied to clipboard
val serviceUuids: List<ParcelUuid>? = null

A list of UUIDs of services offered by the BLE device

Functions

Link copied to clipboard
open override fun describeContents(): Int
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun writeToParcel(parcel: Parcel, flags: Int)