How does the bluetooth a2dp profile work?

I want to create a bluetooth music player application that transfers audio from one device to another. I read everything on the Android developers page about bluetooth , and I found that a profile called a2dp was specifically created for streaming audio. However, there is not much about how to use it. I also looked at a bluetooth chat example , but I was not able to figure out how to actually send audio and how to receive it. I also read that the a2dp sink function was added with Android 5.0. Having spent hours on stackoverflow, I see numerous questions asking the same thing, but without a satisfactory answer.

My main questions are

  • How does the bluetooth a2dp profile work?
  • Are there more efficient methods for implementing audio streaming between Android devices besides a2dp?

Any help would be greatly appreciated.

+4
source share
1 answer

You can read the AVDTP kernel specification to find out what happens during an a2dp connection. But if you want to know about the work in terms of coding, I suggest you go through this blog, which I found useful.

0
source

Source: https://habr.com/ru/post/1671405/


All Articles