开发者

A2DP drops when trying to BluetoothSocket.connet() in Android

So I am working with a hardware device that utilizes开发者_JAVA百科 A2DP, HFP, AVRCP, and SPP. The problem I am getting seems to be only on some phones but I want to resolve it.

While connecting the hardware device through Android (pair.connect) everything works fine. If I go into a default music player it streams correctly as well as AVRCP commands working.

However, in the app I am working on I use SPP. And when I try to use the BluetoothSocket.connet() method it causes the hardware to lose A2DP and AVRCP (media connections) I am using the standard bluetoothSerialService class from the Bluetooth Chat example

private static final UUID SerialPortServiceClass_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");

...

mmSocket = mmDevice.createRfcommSocketToServiceRecord(SerialPortServiceClass_UUID);
mmSocket.connect();

The phones that don't work and I am testing include Droid X (2.2/2.3), HTC Desire 2.2, Droid1 2.2. And it works on Samsung Captivate 2.2 and LG Optimus One 2.2

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜