Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/178.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 我从来没有从BluetoothSocket中出来过_Android_Bluetooth - Fatal编程技术网

Android 我从来没有从BluetoothSocket中出来过

Android 我从来没有从BluetoothSocket中出来过,android,bluetooth,Android,Bluetooth,知道是什么导致了这个问题吗? 我执行connect()函数,不再执行其他代码 代码: 日志: 05-01 20:10:00.569 24445-24445/bluetooth.example.com.bluetoothserial D/OpenGLRenderer﹕ Enabling debug mode 0 05-01 20:10:07.606 24445-24445/bluetooth.example.com.bluetoothserial D/BluetoothUtils﹕ isSoc

知道是什么导致了这个问题吗? 我执行
connect()
函数,不再执行其他代码

代码:

日志:

05-01 20:10:00.569  24445-24445/bluetooth.example.com.bluetoothserial D/OpenGLRenderer﹕ Enabling debug mode 0
05-01 20:10:07.606  24445-24445/bluetooth.example.com.bluetoothserial D/BluetoothUtils﹕ isSocketAllowedBySecurityPolicy start : device null
05-01 20:10:07.606  24445-24445/bluetooth.example.com.bluetoothserial W/BluetoothAdapter﹕ getBluetoothService() called with no BluetoothManagerCallback
05-01 20:10:07.626  24445-24445/bluetooth.example.com.bluetoothserial D/BluetoothSocket﹕ connect(), SocketState: INIT, mPfd: {ParcelFileDescriptor: FileDescriptor[61]}
05-01 20:10:08.086  24445-24445/bluetooth.example.com.bluetoothserial I/Choreographer﹕ Skipped 31 frames!  The application may be doing too much work on its main thread.

有什么想法吗?

我没有正确的UUID,我通过获得正确的UUID并在代码中替换它来解决它

如何获取UUID:

ParcelUuid[] list = mmDevice.getUuids();
ParcelUuid[] list = mmDevice.getUuids();