You never need to do this. If you want to transfer music to earpiece, You just need to start a intent to let user enable BT and connect to the earpiece. This is the BT A2DP protocal which android already implemented. BTW, I think a normal server socket could not work for you.
On Aug 30, 11:36 pm, the_edge123 <[email protected]> wrote: > Hello, > > I want to connect my app to a BT earpiece so that the sound coming > from the mike is heard on the phone and the sound played by the app is > heard in the BT earpiece. > My approach is to open a bluetooth server socket. Once the connection > is established, the input stream would be played by a mediaplayer and > the output stream would be sent as-is to the earpiece. > > Any advice ? > > - > Fabien -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

