Methods Summary |
---|
public int | describeContents()
return 0;
|
public boolean | equals(java.lang.Object obj)
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
AdvertiseData other = (AdvertiseData) obj;
return Objects.equals(mServiceUuids, other.mServiceUuids) &&
BluetoothLeUtils.equals(mManufacturerSpecificData, other.mManufacturerSpecificData) &&
BluetoothLeUtils.equals(mServiceData, other.mServiceData) &&
mIncludeDeviceName == other.mIncludeDeviceName &&
mIncludeTxPowerLevel == other.mIncludeTxPowerLevel;
|
public boolean | getIncludeDeviceName()Whether the device name will be included in the advertisement packet.
return mIncludeDeviceName;
|
public boolean | getIncludeTxPowerLevel()Whether the transmission power level will be included in the advertisement packet.
return mIncludeTxPowerLevel;
|
public android.util.SparseArray | getManufacturerSpecificData()Returns an array of manufacturer Id and the corresponding manufacturer specific data. The
manufacturer id is a non-negative number assigned by Bluetooth SIG.
return mManufacturerSpecificData;
|
public java.util.Map | getServiceData()Returns a map of 16-bit UUID and its corresponding service data.
return mServiceData;
|
public java.util.List | getServiceUuids()Returns a list of service UUIDs within the advertisement that are used to identify the
Bluetooth GATT services.
return mServiceUuids;
|
public int | hashCode()
return Objects.hash(mServiceUuids, mManufacturerSpecificData, mServiceData,
mIncludeDeviceName, mIncludeTxPowerLevel);
|
public java.lang.String | toString()
return "AdvertiseData [mServiceUuids=" + mServiceUuids + ", mManufacturerSpecificData="
+ BluetoothLeUtils.toString(mManufacturerSpecificData) + ", mServiceData="
+ BluetoothLeUtils.toString(mServiceData)
+ ", mIncludeTxPowerLevel=" + mIncludeTxPowerLevel + ", mIncludeDeviceName="
+ mIncludeDeviceName + "]";
|
public void | writeToParcel(android.os.Parcel dest, int flags)
dest.writeList(mServiceUuids);
// mManufacturerSpecificData could not be null.
dest.writeInt(mManufacturerSpecificData.size());
for (int i = 0; i < mManufacturerSpecificData.size(); ++i) {
dest.writeInt(mManufacturerSpecificData.keyAt(i));
byte[] data = mManufacturerSpecificData.valueAt(i);
if (data == null) {
dest.writeInt(0);
} else {
dest.writeInt(1);
dest.writeInt(data.length);
dest.writeByteArray(data);
}
}
dest.writeInt(mServiceData.size());
for (ParcelUuid uuid : mServiceData.keySet()) {
dest.writeParcelable(uuid, flags);
byte[] data = mServiceData.get(uuid);
if (data == null) {
dest.writeInt(0);
} else {
dest.writeInt(1);
dest.writeInt(data.length);
dest.writeByteArray(data);
}
}
dest.writeByte((byte) (getIncludeTxPowerLevel() ? 1 : 0));
dest.writeByte((byte) (getIncludeDeviceName() ? 1 : 0));
|