Android: audioManager.communicationDevice returns TYPE_BUILTIN_EARPIECE on Android 14, even when bluetooth headset is connected

20 views Asked by At

I have encountered this behaviour on Android 14, Pixel 6a when playing some ringtone in my app.

When I am executing the following code,

audioManager.communicationDevice?.type == TYPE_BLUETOOTH_A2DP

It returns false. The communicationDevice returned in this case is TYPE_BUILTIN_EARPIECE even though my air pods are connected.

This works fine on Android 13 however and it returns true for the same use case.

Is this a known issue/change in behavior? Could someone explain why this happens? Thanks!

0

There are 0 answers