【问题标题】:bluetoothsocket can't connect with remote bluetoothdevicebluetoothsocket 无法与远程蓝牙设备连接
【发布时间】:2014-12-12 16:57:25
【问题描述】:

我正在开发一个 android 应用程序,并尝试连接到其他配对设备。当我连接到设备时,我的 Logcat 显示此警告 getBluetoothService() 调用没有 BluetoothManagerCallback 并且套接字的状态是:connect() , SocketState: INIT, mPfd: {ParcelFileDescriptor: FileDescriptor[47]}。 有人可以告诉我为什么套接字无法连接到远程设备?

谢谢

【问题讨论】:

    标签: android


    【解决方案1】:

    请访问您的 android sdk 有一个示例蓝牙聊天应用程序 例如:(adt-bundle-linux-x86-20140702/sdk/samples/android-19/legacy/Bluetooth Chat)。将项目导入您的工作空间. 在示例项目中有一个 BluetoothChatService.java 类。 请参考对您有帮助的课程。

    【讨论】:

      猜你喜欢
      • 2016-08-08
      • 2016-07-08
      • 1970-01-01
      • 2018-07-07
      • 2018-11-16
      • 2021-04-26
      • 2015-01-14
      • 2020-10-10
      • 1970-01-01
      相关资源
      最近更新 更多