System.Bluetooth.TBluetoothAdapter.StartDiscoverable

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure StartDiscoverable(Timeout: Cardinal);

C++

void __fastcall StartDiscoverable(unsigned Timeout);

Properties

Type Visibility Source Unit Parent
procedure
function
protected
System.Bluetooth.pas
System.Bluetooth.hpp
System.Bluetooth TBluetoothAdapter

Description

Starts a request to make the device that is running your application discoverable via Bluetooth.

The StartDiscoverable method from the manager of your adapter calls StartDiscoverable on your manager.

StartDiscoverable expects a single argument, Timeout, which is how long you want the device that is running your application to be discoverable via Bluetooth (in seconds).

If the user accepts and your request succeeds, the OnDiscoverableEnd event of the manager of your adapter occurs.

Platform Support

Platform Supported Notes

32-bit Windows
64-bit Windows

YesC++11Feature.png
  • The OnDiscoverableEnd event of the manager of your adapter always occurs after Timeout. Windows always grants discoverable requests, user permission is not necessary.

OS X

  • Users must actively choose to make the device that is running your application discoverable. You cannot request to make the device discoverable from your application.

Android

YesC++11Feature.png
  • Timeout cannot be greater than 300 seconds. If you specify a value greater than 300 seconds, 300 seconds are used instead.

See Also