【发布时间】:2016-07-19 15:02:18
【问题描述】:
是蓝牙耳机还是手机?
如何在 android 代码中区分蓝牙耳机和支持蓝牙的 android 设备。
我正在开发一个小应用程序,因为我有一个阻止通过蓝牙传输数据的功能,但它需要允许通过蓝牙耳机进行通信。
-
我参考了他们建议我的示例和代码 仅配对/取消配对蓝牙设备。 Android: How to pair bluetooth devices programmatically?
or else 获取所有连接的设备。 In Android, how to get the profile of a connected bluetooth device?
我是否可以在设备中获得与类型相关的任何广播消息 设备连接?
请帮助我将连接的蓝牙设备区分为耳机/android设备(手机)等,
提前谢谢你。
【问题讨论】:
-
你应该看看这个问题。这有你需要的所有答案 -stackoverflow.com/questions/5989847/…
标签: android bluetooth android-bluetooth android-broadcast