Added in API level 36

BluetoothAddress


class BluetoothAddress : Parcelable
kotlin.Any
   ↳ android.bluetooth.BluetoothDevice.BluetoothAddress

A data class for Bluetooth address and address type.

Summary

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

Public methods
Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

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

Added in API level 36
BluetoothAddress(
    address: String?,
    addressType: Int)
Parameters
address String?: This value may be null.
addressType Int: Value is one of the following:

Public methods

describeContents

Added in API level 36
fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.
Value is either 0 or

getAddress

Added in API level 36
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

Added in API level 36
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 the following:
out Parcel: This value cannot be null.

Properties

CREATOR

Added in API level 36
static val CREATOR: Parcelable.Creator<BluetoothDevice.BluetoothAddress!>

Parcelable.Creator interface implementation.