如题,使用vivo手机连接远程蓝牙,接收不到消息,其他品牌手机可以接收到消息。代码如下
蓝牙连接
private static final UUID BluetoothUUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
BluetoothSocket bluetoothSocket;
BluetoothDevice bluetoothDevice;
bluetoothSocket = bluetoothDevice.createRfcommSocketToServiceRecord(BluetoothUUID);
bluetoothSocket.connect();
接收消息
InputStream in = null;
try {
in = bluetoothSocket.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
while (true) {
synchronized (this) {
BluetoothDevice remoteDevice = bluetoothSocket.getRemoteDevice();
Log.e(TAG, "接收数据" + reader.readLine());
}
}
} catch (IOException e) {
e.printStackTrace();
}
还请各位帮忙看下是什么问题