(String address)
| 181 | } |
| 182 | |
| 183 | public AndroidPort connect(String address) |
| 184 | throws IOException { |
| 185 | BluetoothDevice device = adapter.getRemoteDevice(address); |
| 186 | if (device == null) |
| 187 | throw new IOException("Bluetooth device not found"); |
| 188 | |
| 189 | BluetoothSocket socket = |
| 190 | device.createRfcommSocketToServiceRecord(THE_UUID); |
| 191 | return new BluetoothClientPort(socket); |
| 192 | } |
| 193 | |
| 194 | public AndroidPort createServer() throws IOException { |
| 195 | return new BluetoothServerPort(adapter, THE_UUID); |
no outgoing calls
no test coverage detected