BluetoothAddress


class BluetoothAddress : Parcelable

A data class for Bluetooth address and address type.

Summary

Inherited constants
Int CONTENTS_FILE_DESCRIPTOR

Descriptor bit used with describeContents(): indicates that the Parcelable object's flattened representation includes a file descriptor.

Int PARCELABLE_WRITE_RETURN_VALUE

Flag for use with writeToParcel: the object being written is a return value, that is the result of a function such as "Parcelable someFunction()", "void someFunction(out Parcelable)", or "void someFunction(inout Parcelable)". Some implementations may want to release resources at this point.

Public constructors
BluetoothAddress(address: String?, addressType: Int)

Public methods
Int

String?

Returns the address of this BluetoothAddress.

Int

Returns the address type of this BluetoothAddress, one of ADDRESS_TYPE_PUBLIC, ADDRESS_TYPE_RANDOM, or ADDRESS_TYPE_UNKNOWN.

Unit
writeToParcel(out: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<BluetoothDevice.BluetoothAddress!>

Parcelable.Creator interface implementation.

Public constructors

BluetoothAddress

BluetoothAddress(
    address: String?,
    addressType: Int)

Public methods

describeContents

fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getAddress

fun getAddress(): String?

Returns the address of this BluetoothAddress.

For example, "00:11:22:AA:BB:CC".

Return
String? Bluetooth address as string This value may be null.

writeToParcel

fun writeToParcel(
    out: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written. 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
out Parcel: This value cannot be null.

Properties

CREATOR

static val CREATOR: Parcelable.Creator<BluetoothDevice.BluetoothAddress!>

Parcelable.Creator interface implementation.