BlueCove 2.1.1用の RemoteDeviceDiscovery サンプル プロジェクトをビルドして実行しました。プログラムは検出可能なすべての Bluetooth デバイスを検出しますが、以前にペアリングされた deviceDiscovered() デバイスも報告します。
(Android のように) 周囲のデバイスのみを検出する方法はありますか? 以下のコードは、検出されたデバイスとペアリングされたデバイスの両方を返します...
public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) {
System.out.println("Device " + btDevice.getBluetoothAddress() + " found");
devicesDiscovered.addElement(btDevice);
try {
System.out.println(" name " + btDevice.getFriendlyName(false));
} catch (IOException cantGetDeviceName) {
}
}