I have a bluetooth button and I need to connect it with my Java code (not Android). I found bluecove
- implementation of JSR82, but I really don't understand how to use it? Ultimately I need my program to handle button clicks.
Now I found solution to find neraby devices:
LocalDevice localDevice = LocalDevice.getLocalDevice();
DiscoveryAgent agent = localDevice.getDiscoveryAgent();
RemoteDevice[] remoteDevices = agent.retrieveDevices(DiscoveryAgent.PREKNOWN);
but how to connect and listent events? Is it even possible?