System.Bluetooth.TBluetoothGattServer.StartAdvertising

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

procedure StartAdvertising;

C++

void __fastcall StartAdvertising(void);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Bluetooth.pas
System.Bluetooth.hpp
System.Bluetooth TBluetoothGattServer

Description

Starts broadcasting its advertising data to any reachable remote client.

Alternatively, you may make AdvertiseService True so that your GATT server broadcasts its advertising data as you add services to your GATT server.

Clients may handle received advertising data using the TBluetoothLEManager.OnDiscoverLeDevice event.

Exceptions

Exception Message Scenarios

EBluetoothLEAdvertiseDataException

Failed to start advertising because no advertising instance is available

Operation failed due to an internal error

  • StartAdvertising failed due to an internal error that occurred on the run-time platform. Only affects Android.

There was unknown error

  • StartAdvertising failed due to an unknown error that occurred on the run-time platform. Only affects Android.

This feature is not supported on this platform

  • The run-time platform does not support advertising data. Only affects Android.

See Also