Question

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.

Was it helpful?

Solution 3

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.

OTHER TIPS

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.

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top