getbluetoothservice()调用时没有bluetoothmanagercallback [英] getbluetoothservice() called with no bluetoothmanagercallback

查看:7310
本文介绍了getbluetoothservice()调用时没有bluetoothmanagercallback的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到getbluetoothservice()调用时没有bluetoothmanagercallback作为经常在我的Andr​​oid应用程序错误。我不知道是什么原因造成这样或任何有关蓝牙管理器回调。任何人都可以给我什么可能会造成这个问题或者是一个好主意,开始寻找

I am getting "getbluetoothservice() called with no bluetoothmanagercallback" as an error frequently in my Android application. I have no idea what is causing this or anything about bluetooth manager callbacks. Can anyone give me a good idea of what could be causing this problem or where to start looking

推荐答案

通过阅读到Android源$ C ​​$ C,这似乎是一个警告你不能做任何事情。该人士$ ​​C $ C表明,如果你调用

By reading into the Android source code, it seems to be a warning you cannot do anything about. The source code shows that if you call

BluetoothSocket#connect();

然后,它会调用

Then it will call

BluetoothAdapter.getDefaultAdapter().getBluetoothService(null);

这里的关键是,它通过在上述线的空参数。由于这个原因,就没有回调,然后的BluetoothSocket类将抛出一个警告。

The key here, is the null parameter that it passes in the above line. Due to this, there will be no callback, and then the BluetoothSocket class will throw out a warning.

由于这只是一个警告,我不认为你需要做任何事情。

Since it is only a warning, I do not think you need to do anything about it.

<一个href="https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/bluetooth/BluetoothSocket.java">https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/bluetooth/BluetoothSocket.java线306 <一href="https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/bluetooth/BluetoothAdapter.java">https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/bluetooth/BluetoothAdapter.java行1610

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 line 1610

这篇关于getbluetoothservice()调用时没有bluetoothmanagercallback的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆