Has any one been able to use JSR-82 API to connect to devices which are not discoverable. I would like to be able to connect to a device which has been previously paired. However I don't see any method of retrieving previously paired devices, to choose one to connect to. I don't want to leave my laptop in discoverable mode, I just want to pair it once and then be able to have my java application connect to it.
According to the JSR-82 spec, the Bluetooth Control Center must provide the list of paired and trusted devices. However, I cannot find that API in the specification.
JSR-82 provides retrieveDevices in the DiscoveryAgent class, but the implementation is not very strict. For example, on my Samsung phone, CACHED devices are devices found by an inquiry from the same instance of the application, PREKNOWN devices, are devices which are which were found by inquiry since the last reset. After resetting the phone, both of these lists are empty.
I suppose I could try to use non volatile records in my application to keep my own records, but that seems wrong since all phones keep a list of paired devices.
|