function returns the name of the device as broadcast to other Bluetooth devices. When other Bluetooth enabled devices scan for nearby devices to connect to, this is the name that they will see.
When using Bluetooth for synchronization between two devices the Bluetooth name of the device is what is shown in the screen asking the user which device to connect to. In addition the Bluetooth name of one device may be passed as an argument to the syncconnect
function on the other device in order to connect directly to that device bypassing the screen asking the user which device to connect to.
Because it is possible to change the Bluetooth device name in the settings on Android and in the Device Manager on Windows, the Bluetooth name can be used as a way to name devices for management and audit purposes. The device can be assigned a unique identifer or serial number which is used as the Bluetooth device name. Using getbluetoothname
, this identifier can be written to an item in the data file for audit purposes, supplied as a username for synchronization or used as a key in lookup file as part of a survey management system.
The function returns a string containing the name of the device.