I've found that discovery using the function:
requires a large amount of time (which varies anywhere from 10-30 seconds).
I'm attempting to speedup the connection process and get to 'static Connection open(String name)' in the Connector class a bit faster.
Using the bluetooth hardware address won't work because there's more than one device that I want my program to discover and the hardware address may not be known beforehand.
Using the bluetooth friendly name won't work either because startInquiry() must complete before 'java.lang.String getFriendlyName(boolean alwaysAsk)' can be called.
So I've resorted to perhaps using the Class of Device (CoD) values to determine whether I've discovered one of my bluetooth devices. Once I have I can simply call 'boolean (DiscoveryAgent.)cancelInquiry(DiscoveryListener listener)' once I've found one of my bluetooth devices.
I can set these values in the firmware of my bluetooth devices. But I'm not too sure if CoD values are specific enough to be absolutely sure I've discovered one of my bluetooth devices and not some device that has the same CoD value. Could someone tell me if CoD values are relatively unique for each device?