7

Let's assume we have a rooted Android OS on a device that supports Bluetooth. Can we build an app that advertises itself as a Bluetooth speaker via Bluetooth A2DP?

If that was possible, then any other device could pair / connect to our Bluetooth server app and stream any music / sound. This server app could then take the music stream and play it locally or even send it to other devices via Wi-Fi. This would theoretically enable a multi-room Bluetooth solution.

Any idea how to achieve this? Where would I start?

Daniel
  • 2,087
  • 3
  • 23
  • 37
  • Didn't you just ask that same question a few minutes ago? – 323go Nov 24 '14 at 20:27
  • 1
    Read [this](https://stackoverflow.com/questions/9290511/how-to-make-an-android-phone-as-bluetooth-headset) and the other questions it links to. – Bart Platak Nov 24 '14 at 20:27
  • @323go no I did not. The other question was about 'abusing' Bluetooth to get access to the local system audio out without root rights. This one is about inter-device communication where the server is a rooted device that receives the Bluetooth audio from any other device nearby. – Daniel Nov 24 '14 at 20:31

1 Answers1

2

Turns out there is a very good and detailed answer to a related question here.

Short Answer: Possible, but requires to modify the Android OS configuration and quite some low level NDK development to expose the A2DP Sink role as API to be used.

Thanks @BartPlatak for the pointer!

Community
  • 1
  • 1
Daniel
  • 2,087
  • 3
  • 23
  • 37
  • 1
    The answer is based on bluez which is not used in Android L. You can find detailed answer for Android L http://blog.csdn.net/wendell_gong/article/details/47950781. – Wenjie Gong Aug 25 '15 at 08:49