(3.0 之前的)Android 程序可以连接到蓝牙 A2DP 设备吗?

发布于 2024-12-08 13:01:08 字数 122 浏览 0 评论 0原文

使用gingerbread/froyo/eclair(例如2.1、2.2、2.3 -> 不是蜂窝)编写的程序可以连接到A2DP 蓝牙接收器设备吗?或者,我是否需要让用户转到他们的设置才能执行此操作?任何帮助或建议将不胜感激。

Can a program that is written using the gingerbread/froyo/eclair (e.g. 2.1, 2.2, 2.3 -> NOT honeycomb) connect to a A2DP bluetooth sink device?? Or, do I need to have the user go to their settings to do so? Any help or advice would be highly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

人间不值得 2024-12-15 13:01:08

因此,经过更多研究,似乎不可能在 3.0 之前的 Android 设备上以编程方式连接到 A2DP 设备。我将将此标记为答案,但如果有人发现其他问题,请纠正我,因为我真的很想以编程方式完成此操作。

So, after much more research, it seems that it is impossible to programmatically connect to a A2DP device on a pre-3.0 Android device. I am going mark this as the answer but, if someone finds otherwise, please correct me on this as I would really like to do it programmatically.

晚雾 2024-12-15 13:01:08

你不能使用BluetoothA2dp::connectSink()吗?创建一个 BluetoothA2dp 实例,然后使用您尝试连接的设备调用 connectSink(BluetoothDevice device) 。

代码:
http://www.google.com/codesearch#uX1GffpyOZk/core/java/android/bluetooth/BluetoothA2dp.java&q=BluetoothA2dp&l=112

看来这个API不是不过,BluetoothA2dp 的 Android API 参考中列出了:
http://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html

Can't you use BluetoothA2dp::connectSink()? Create a BluetoothA2dp instance, then call connectSink(BluetoothDevice device) with the device you're trying to connect to.

code:
http://www.google.com/codesearch#uX1GffpyOZk/core/java/android/bluetooth/BluetoothA2dp.java&q=BluetoothA2dp&l=112

It seems like this API is not listed in the Android API reference for BluetoothA2dp though:
http://developer.android.com/reference/android/bluetooth/BluetoothA2dp.html

辞取 2024-12-15 13:01:08

因此,经过更多研究,我发现并验证实际上可以使用隐藏的 API 通过蓝牙连接到 a2dp 设备。然而,似乎在蜂窝后,这种方法不再可能了......我将就此发布另一个问题。

So, after much more research, I found and verified that it is actually possible to use the hidden API's to connect to a a2dp device via bluetooth. However, it seems that post-honeycomb, that method isn't possible anymore... I will post another question regarding that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文