getFriendlyName
public java.lang.String getFriendlyName(boolean alwaysAsk)
throws java.io.IOExceptionReturns the name of this device. The Bluetooth specification calls this name the "Bluetooth device name" or the "user-friendly name". This method will only contact the remote device if the name is not known or alwaysAsk is true.
Parameters:
alwaysAsk - if
true then the device will be contacted for its name, otherwise, if there exists a known name for this device, the name will be returned without contacting the remote device
Returns:
the name of the device, or null if the Bluetooth system does not support this feature;
if the local device is able to contact the remote device, the result will never be null; if the remote device does not have a name then an empty string will be returned
Throws:
java.io.IOException - i
f the remote device can not be contacted or the remote device could not provide its name