Android 蓝牙 API 连接多个设备 [英] Android Bluetooth API connect to multiple devices

查看:31
本文介绍了Android 蓝牙 API 连接多个设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以连接多个设备吗?谁能给我分享一下代码!这个问题困扰了我很久!谢谢!

Is it possible for us to connect multiple devices ? who can share the code for me! This problem has troubled me for a long time! Thanks!

推荐答案

我认为代码不是问题.正确的实现是为每个连接管理一个线程,但是我发现您可以同时连接的设备数量受到手机蓝牙实现的限制.蓝牙规范规定可以连接 7 个设备,但是我发现 Android 手机只能处理 1 个蓝牙连接,而其他手机可以处理 6 个.如果 Android 开发团队的某个人可以在这里进行更深入的研究,这对蓝牙开发社区真的很有帮助.

I would say that code isn't the problem. The correct implementation is managing a thread for each connection however I have found that the number of devices you can connect to simultaneously is limited based on the phone's implementation of Bluetooth. Bluetooth spec states 7 devices can be connected however I have found android phones that can only handle 1 bluetooth connection while others can handle 6. It would really help the Bluetooth development community if someone from the Android development team could go more in depth here.

这篇关于Android 蓝牙 API 连接多个设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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