【发布时间】:2020-11-13 18:33:27
【问题描述】:
我得到一个 A2DP 设备列表,如下所示:
bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
bluetoothAdapter.getProfileProxy(context, new BluetoothProfile.ServiceListener() {
@Override
public void onServiceConnected(int profile, BluetoothProfile proxy) {
List<BluetoothDevice> devices = proxy.getConnectedDevices();
}
@Override
public void onServiceDisconnected(int profile) {
}
}, BluetoothProfile.A2DP);
问题在于,有时,当我连接了多个设备时,只有其中一个设备从我的应用程序获取音频流。我怎么知道哪个设备是获取流的设备?另外我听说在较新的 Android 版本中,您可以连接到蓝牙设备,但仍然在手机本身播放音频,有没有办法知道什么时候会发生这种情况?
【问题讨论】:
标签: android android-bluetooth a2dp