的BluetoothSocket无法与远程连接BluetoothDevice类 [英] bluetoothsocket can't connect with remote bluetoothdevice
问题描述
我在开发Android aplication,我尝试连接到其他配对设备。当我去连接到设备我LogCat中显示此警告 getBluetoothService()调用时没有BluetoothManagerCallback 的和插座的状态是: 连接() ,SocketState:INIT,MPFD:{ParcelFileDescriptor:的FileDescriptor [47] 的}。
有人能告诉我为什么插座无法连接到去远程设备?
I'm developing an android aplication, and i try to connect to a other paired device. When I go to connect to the device my Logcat show this warning getBluetoothService() called with no BluetoothManagerCallback and the state of socket is: connect(), SocketState: INIT, mPfd: {ParcelFileDescriptor: FileDescriptor[47]}. Someone can tell me why the socket can not connect to de remote device??
感谢
推荐答案
请访问您的Android SDK中有一个样本蓝牙聊天应用程序如:(ADT-束Linux的x86-20140702 / SDK /样本/ Android的19 /传统/蓝牙聊天).IMPORT在您的工作空间项目。
在示例项目中有一个BluetoothChatService.java类。
请参阅类它会帮助你。
Please visit your android sdk there is a sample Bluetooth chat application For eg:(adt-bundle-linux-x86-20140702/sdk/samples/android-19/legacy/Bluetooth Chat).Import the project in your work space. In the sample Project there is a BluetoothChatService.java class. Please refer to the class it will helps you.
这篇关于的BluetoothSocket无法与远程连接BluetoothDevice类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!