J2ME: enumerating Bluetooth services whilst simultaneously getting the service name
On at least one device (a BlueSmirf), using the following construct in J2ME
agent.searchServices(new int[] {0×100}, new UUID[]{new UUID},dev, this);
will fail with an UNREACHABLE error code when searching for available Bluetooth services whilst also retrieving the service name attribute (0×100).
Instead, what I had to do was use
agent.searchServices(null,new UUID[]{new UUID},dev, this);
And then once all services have been discovered [...]