Thursday, June 16, 2011

[android-developers] How to make A2DP connection automatically

Hi,

I am trying to develop an application, in which my phone will act as
the A2DP source and my PC with UBUNTU and bluetooth connection acts as
A2DP sink. It is getting connected when I tried manually and I am able
to listen the song played from phone in PC speakers. I want to make
this A2DP connection (programatically) from my application. Please see
the below code snippet I have tried.

private static final UUID MY_UUID =
UUID.fromString("0000110A-0000-1000-8000-00805F9B34FB");
btSocket = device.createRfcommSocketToServiceRecord(MY_UUID);
btSocket.connect();

But the connection is not getting established. I dont know the method
I tried is correct or not.

Thanks in advance,
Sreehari

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate