System.Bluetooth.Components.TBluetoothLE.DiscoverDevices

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function DiscoverDevices(ATimeout: Integer): Boolean; overload;
function DiscoverDevices(ATimeout: Integer; const AList: TBluetoothUUIDsList): Boolean; overload;
function DiscoverDevices(ATimeout: Integer; AList: array of TBluetoothUUID): Boolean; overload;

C++

bool __fastcall DiscoverDevices(int ATimeout)/* overload */;
bool __fastcall DiscoverDevices(int ATimeout, System::Bluetooth::TBluetoothUUIDsList* const AList)/* overload */;
bool __fastcall DiscoverDevices(int ATimeout, GUID *AList, const int AList_High)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.Bluetooth.Components.pas
System.Bluetooth.Components.hpp
System.Bluetooth.Components TBluetoothLE

Description

Starts a discovery operation to find remote devices using Bluetooth Low Energy.

DiscoverDevices always expects a <Timeout> argument, which is how much time you want to spend discovering remote devices using Bluetooth Low Energy.

You may also provide an <AList> argument, an array or list of UUIDs of services to look for in remote devices. If you provide a list of service UUIDs, the discovery operation ignores any remote device that does not provide at least one service with an UUID from the specified list.

When the discovery operation finishes, the OnEndDiscoverDevices event occurs. OnEndDiscoverDevices provides a list of discovered remote devices.

DiscoverDevices returns True if the discovery starts successfully, or False if something prevents the discovery from starting.

Platform Support

Platform Notes

Windows

Mac OS X

  • OnEndDiscoverDevices always occurs some time after the specified <Timeout>, never before.
  • Always returns True.

iOS

  • OnEndDiscoverDevices always occurs some time after the specified <Timeout>, never before.
  • Always returns True.

Android

See Also