Closed santhoshvai closed 1 year ago
cc @saghul for visiblity
Thanks for the works @santhoshvai and @vanGalilea for the help to confirm :+1: Will look into it asap.
Looks good, thanks for the PR, will leave it few days before release
@zxcpoiu any plan for a release containing this?
Doesn't work for me, while in webrtc call :(
In logs there is BT state=UNINITIALIZED
BluetoothManagerService: Sending State Change: TURNING_ON > ON
InCallManager: --- updateAudioDeviceState: wired headset=false, BT state=UNINITIALIZED
InCallManager: Device status: available=[EARPIECE, SPEAKER_PHONE], selected=SPEAKER_PHONE, user selected=NONE
InCallManager: --- updateAudioDeviceState done
It has been released as 4.1.0.
@gavrilikhin-d make sure you have bluetooth permission in your menifest, and
BLUETOOTH
prior to android api 31.
BLUETOOTH_CONNECT
on api 31+ and later.
you can check https://github.com/zoontek/react-native-permissions for how to request it properly.
@gavrilikhin-d make sure you have bluetooth permission in your menifest, and
BLUETOOTH
prior to android api 31.BLUETOOTH_CONNECT
on api 31+ and later.you can check https://github.com/zoontek/react-native-permissions for how to request it properly.
Yes, I didn't know that you must explicitly request bluetooth permissions from user
startBluetoothSco
is deprecated in Android T. Instead, android recommends usingsetCommunicationDevice
. This API was available starting Android 31 and has been the preferred way since.This implementation was taken from Google's Oboe repo.
In this PR, I have made the change so that we use the new API in Android 31 or newer.
This was tested and verified to be correct on Pixel 7 Android 33, OnepPlus Android 33, and Mi2 Android 30.