private void connect(BluetoothDevice device) throws IOException { // 固定的UUID final String SPP_UUID = "00001101-0000-1000-8000-00805F9B34FB"; UUID uuid = UUID.fromString(SPP_UUID); BluetoothSocket socket = device.createRfcommSocketToServiceRecord(uuid); socket.connect(); }
Android 蓝牙设备的查找和连接(3)
内容版权声明:除非注明,否则皆为本站原创文章。