Class BluetoothLeAdvertiseData
Definition
- Namespace:
- Tizen.Network.Bluetooth
- Assembly:
- Tizen.Network.Bluetooth.dll
- API Level:
- 3
Bluetooth LE advertise data. Handles the data advertising.
C#Copypublic class BluetoothLeAdvertiseData : IDisposable
- Inheritance
-
System.ObjectBluetoothLeAdvertiseData
- Implements
-
System.IDisposable
Constructors
BluetoothLeAdvertiseData()
The default constructor initializes an object of the BluetoothLeAdvertiseData.
Declaration
C#Copypublic BluetoothLeAdvertiseData()
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Bluetooth LE is not supported. |
System.InvalidOperationException | Thrown when the Bluetooth LE is not enabled or when create advertiser fails. |
API Level: 3
Properties
Declaration
C#Copypublic bool AdvertisingConnectable { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
The Bluetooth must be enabled.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Bluetooth LE is not supported. |
System.InvalidOperationException | Thrown when the Bluetooth LE is not enabled or when the set advertising connectable mode fails. |
API Level: 3
Declaration
C#Copypublic BluetoothLeAdvertisingMode AdvertisingMode { get; set; }
Property Value
Type | Description |
---|---|
BluetoothLeAdvertisingMode |
Remarks
The Bluetooth must be enabled.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Bluetooth LE is not supported. |
System.InvalidOperationException | Thrown when the Bluetooth LE is not enabled or when the set advertising mode fails. |
API Level: 3
Appearance
Sets the external appearance of this device to the advertise or the scan response data. Please refer to the adopted Bluetooth specification for the appearance.
Declaration
C#Copypublic int Appearance { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
The Bluetooth must be enabled.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Bluetooth LE is not supported. |
System.InvalidOperationException | Thrown when the Bluetooth LE is not enabled or when the set appearance fails. |
API Level: 3
IncludeDeviceName
Sets whether the device name has to be included in the advertise or the scan response data. The maximum advertised or responded data size is 31 bytes including the data type and the system wide data.
Declaration
C#Copypublic bool IncludeDeviceName { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
The Bluetooth must be enabled.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Bluetooth LE is not supported. |
System.InvalidOperationException | Thrown when the Bluetooth LE is not enabled or when the set advertising device name fails. |
API Level: 3
IncludeTxPowerLevel
Sets whether the transmission power level should be included in the advertise or the scan response data. The maximum advertised or responded data size is 31 bytes including the data type and the system wide data.
Declaration
C#Copypublic bool IncludeTxPowerLevel { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Remarks
The Bluetooth must be enabled.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Bluetooth LE is not supported. |
System.InvalidOperationException | Thrown when the Bluetooth LE is not enabled or when the set advertising TC power level fails. |
API Level: 3
Declaration
C#Copypublic BluetoothLePacketType PacketType { get; set; }
Property Value
Type | Description |
---|---|
BluetoothLePacketType |
API Level: 3
Methods
AddAdvertisingManufacturerData(BluetoothLePacketType, ManufacturerData)
Adds the manufacturer specific data to the advertise or the scan response data. Please refer to the adopted Bluetooth specification for the the appearance.
Declaration
C#Copypublic void AddAdvertisingManufacturerData(BluetoothLePacketType packetType, ManufacturerData manufacturerData)
Parameters
Type | Name | Description |
---|---|---|
BluetoothLePacketType | packetType | The packet type. |
ManufacturerData | manufacturerData | The manufacturer specific data. |
Remarks
The Bluetooth must be enabled.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Bluetooth LE is not supported. |
System.InvalidOperationException | Thrown when the Bluetooth LE is not enabled or when the add advertising manufacturer data procedure fails. |
API Level: 3
AddAdvertisingServiceData(BluetoothLePacketType, BluetoothServiceData)
Adds a service data to the advertise or the scan response data. The maximum advertised or responded data size is 31 bytes including data type and system wide data.
Declaration
C#Copypublic void AddAdvertisingServiceData(BluetoothLePacketType packetType, BluetoothServiceData data)
Parameters
Type | Name | Description |
---|---|---|
BluetoothLePacketType | packetType | The packet type. |
BluetoothServiceData | data | The service data to be added to advertising. |
Remarks
The Bluetooth must be enabled.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Bluetooth LE is not supported. |
System.InvalidOperationException | Thrown when the Bluetooth LE is not enabled or when the add advertising data procedure fails. |
API Level: 3
AddAdvertisingServiceSolicitationUuid(BluetoothLePacketType, String)
Adds a service solicitation UUID to advertise or scan the response data. The maximum advertised or responded data size is 31 bytes including the data type and the system wide data.
Declaration
C#Copypublic void AddAdvertisingServiceSolicitationUuid(BluetoothLePacketType packetType, string serviceSolicitationUuid)
Parameters
Type | Name | Description |
---|---|---|
BluetoothLePacketType | packetType | The packet type. |
System.String | serviceSolicitationUuid | The service solicitation UUID to add to advertise data. |
Remarks
The Bluetooth must be enabled.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Bluetooth LE is not supported. |
System.InvalidOperationException | Thrown when the Bluetooth LE is not enabled or when the add advertising service solicitation UUID procedure fails. |
API Level: 3
AddAdvertisingServiceUuid(BluetoothLePacketType, String)
Adds a service UUID to the advertise or the scan response data. The maximum advertised or responded data size is 31 bytes including the data type and the system wide data.
Declaration
C#Copypublic void AddAdvertisingServiceUuid(BluetoothLePacketType packetType, string serviceUuid)
Parameters
Type | Name | Description |
---|---|---|
BluetoothLePacketType | packetType | The packet type. |
System.String | serviceUuid | The service UUID to add to advertise data. |
Remarks
The Bluetooth must be enabled.
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Bluetooth LE is not supported. |
System.InvalidOperationException | Thrown when the Bluetooth LE is not enabled or when the add advertising service UUID procedure fails. |
API Level: 3
Declaration
C#Copypublic void Dispose()
API Level: 3
Declaration
C#Copyprotected void Finalize()