type

@get:RequiresPermission(anyOf = ["android.permission.BLUETOOTH", "android.permission.BLUETOOTH_CONNECT"])
abstract val type: AndroidPeripheral.Type

Get the type of the peripheral.

Per Making Android BLE work — part 1: Clearing the cache, when type is Unknown, a scan should be performed before connect.

For apps targeting R or lower, type requires the BLUETOOTH permission which can be gained with a simple <uses-permission> manifest tag.

For apps targeting S or or higher, type requires the BLUETOOTH_CONNECT permission which can be gained with Activity.requestPermissions(String[], int).