Added in API level 33

TransportBlock


class TransportBlock : Parcelable
kotlin.Any
   ↳ android.bluetooth.le.TransportBlock

Wrapper for Transport Discovery Data Transport Blocks. This class represents a Transport Block from a Transport Discovery Data.

Summary

Inherited constants
Public constructors
TransportBlock(orgId: Int, tdsFlags: Int, transportDataLength: Int, transportData: ByteArray?)

Creates an instance of TransportBlock from raw data.

Public methods
Int

Gets the Organization ID of the Transport Block which corresponds to one of the Bluetooth SIG Assigned Numbers.

Int

Gets the TDS flags of the Transport Block which represents the role of the device and information about its state and supported features.

ByteArray?

Gets the Transport Data of the Transport Block which contains organization-specific data.

Int

Gets the total number of octets in the Transport Data field in this Transport Block.

ByteArray?

Converts this TransportBlock to byte array

Int

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<TransportBlock!>

Public constructors

TransportBlock

Added in API level 33
TransportBlock(
    orgId: Int,
    tdsFlags: Int,
    transportDataLength: Int,
    transportData: ByteArray?)

Creates an instance of TransportBlock from raw data.

Parameters
orgId Int: the Organization ID
tdsFlags Int: the TDS flags
transportDataLength Int: the total length of the Transport Data
transportData ByteArray?: the Transport Data This value may be null.

Public methods

getOrgId

Added in API level 33
fun getOrgId(): Int

Gets the Organization ID of the Transport Block which corresponds to one of the Bluetooth SIG Assigned Numbers.

getTdsFlags

Added in API level 33
fun getTdsFlags(): Int

Gets the TDS flags of the Transport Block which represents the role of the device and information about its state and supported features.

getTransportData

Added in API level 33
fun getTransportData(): ByteArray?

Gets the Transport Data of the Transport Block which contains organization-specific data.

Return
ByteArray? This value may be null.

getTransportDataLength

Added in API level 33
fun getTransportDataLength(): Int

Gets the total number of octets in the Transport Data field in this Transport Block.

toByteArray

Added in API level 33
fun toByteArray(): ByteArray?

Converts this TransportBlock to byte array

Return
ByteArray? byte array representation of this Transport Block or null if the conversion failed

totalBytes

Added in API level 33
fun totalBytes(): Int
Return
Int total byte count of this TransportBlock

writeToParcel

Added in API level 33
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 33
static val CREATOR: Parcelable.Creator<TransportBlock!>