dac*_*gen 37 android bluetooth
我getBluetoothService() called with no BluetoothManagerCallback
在Android应用程序中经常出错.
我不知道是什么导致了这个或任何关于蓝牙管理器回调.任何人都可以让我很好地了解可能导致此问题的原因或从哪里开始寻找.
小智 37
通过阅读Android源代码,它似乎是一个警告,你不能做任何事情.源代码显示如果你打电话
BluetoothSocket#connect();
Run Code Online (Sandbox Code Playgroud)
然后它会打电话
BluetoothAdapter.getDefaultAdapter().getBluetoothService(null);
Run Code Online (Sandbox Code Playgroud)
这里的关键是它在上面的行中传递的null参数.因此,将不会有回调,然后BluetoothSocket类将抛出警告.
由于它只是一个警告,我认为你不需要做任何事情.
https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/bluetooth/BluetoothSocket.java line 306 https://android.googlesource.com/platform/frameworks/base/+ /master/core/java/android/bluetooth/BluetoothAdapter.java第1610行
当多个蓝牙套接字一次打开时,似乎会调用它.我通过确保我一次只打开1个套接字来解决这个问题.
归档时间: |
|
查看次数: |
46041 次 |
最近记录: |