AdvertiseData
class AdvertiseData : Parcelable
kotlin.Any | |
↳ | android.bluetooth.le.AdvertiseData |
Advertise data packet container for Bluetooth LE advertising. This represents the data to be advertised as well as the scan response data for active scans.
Use AdvertiseData.Builder
to create an instance of AdvertiseData
to be advertised.
Summary
Nested classes | |
---|---|
Builder for |
Inherited constants | |
---|---|
Public methods | |
---|---|
Int | |
Boolean |
Whether the device name will be included in the advertisement packet. |
Boolean |
Whether the transmission power level will be included in the advertisement packet. |
SparseArray<ByteArray!>! |
Returns an array of manufacturer Id and the corresponding manufacturer specific data. |
MutableMap<ParcelUuid!, ByteArray!>! |
Returns a map of 16-bit UUID and its corresponding service data. |
MutableList<ParcelUuid!> |
Returns a list of service solicitation UUIDs within the advertisement that we invite to connect. |
MutableList<ParcelUuid!>! |
Returns a list of service UUIDs within the advertisement that are used to identify the Bluetooth GATT services. |
MutableList<TransportDiscoveryData!> |
Returns a list of |
String |
toString() |
Unit |
writeToParcel(dest: Parcel, flags: Int) |
Properties | |
---|---|
static Parcelable.Creator<AdvertiseData!> |
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 |
getIncludeDeviceName
fun getIncludeDeviceName(): Boolean
Whether the device name will be included in the advertisement packet.
getIncludeTxPowerLevel
fun getIncludeTxPowerLevel(): Boolean
Whether the transmission power level will be included in the advertisement packet.
getManufacturerSpecificData
fun getManufacturerSpecificData(): SparseArray<ByteArray!>!
Returns an array of manufacturer Id and the corresponding manufacturer specific data. The manufacturer id is a non-negative number assigned by Bluetooth SIG.
getServiceData
fun getServiceData(): MutableMap<ParcelUuid!, ByteArray!>!
Returns a map of 16-bit UUID and its corresponding service data.
getServiceSolicitationUuids
fun getServiceSolicitationUuids(): MutableList<ParcelUuid!>
Returns a list of service solicitation UUIDs within the advertisement that we invite to connect.
Return | |
---|---|
MutableList<ParcelUuid!> |
This value cannot be null . |
getServiceUuids
fun getServiceUuids(): MutableList<ParcelUuid!>!
Returns a list of service UUIDs within the advertisement that are used to identify the Bluetooth GATT services.
getTransportDiscoveryData
fun getTransportDiscoveryData(): MutableList<TransportDiscoveryData!>
Returns a list of TransportDiscoveryData
within the advertisement.
Return | |
---|---|
MutableList<TransportDiscoveryData!> |
This value cannot be null . |
toString
fun toString(): String
Return | |
---|---|
String |
a string representation of the object. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Parameters | |
---|---|
dest |
Parcel: 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 |