简体   繁体   English

使用蓝牙Android连接两个设备?

[英]Connect Two Devices using bluetooth Android?

我想使用android中的蓝牙编程连接两个设备,请指导我,我确实要求您不要参考Android文档,这的确写得很差,所以只用您自己的话解释一下

Bluetooth Chat Application 蓝牙聊天应用

I have found that the sample applications fill in a lot of the gaps in the documentation, and is generally my first source of inspiration when investigating an android feature. 我发现示例应用程序填补了文档中的许多空白,通常是研究android功能时我的第一灵感来源。

Edit 编辑

If you've downloaded the SDK these sample apps are usually bundled with the SDK. 如果您已下载SDK,则这些示例应用程序通常与SDK捆绑在一起。 For me this app is found under. 对我来说,这个应用程序可以在下面找到。

  • \\android-sdk-windows\\samples\\android-7\\BluetoothChat \\ android-sdk-windows \\ samples \\ android-7 \\ BluetoothChat

Update 更新资料

It lists any paired devices and devices detected in the area after discovery. 它列出了所有配对的设备以及发现后在该区域中检测到的设备。 When a device is chosen by the user, the MAC address of the device is sent back to the parent Activity in the result Intent. 用户选择设备后,该设备的MAC地址将在结果Intent中发送回父活动。

Seems pretty straight forward, what part are you having difficulty with? 似乎很简单,您遇到什么困难?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM