Skip to content

Commit

Permalink
Merge pull request #11 from coretech/force-bt
Browse files Browse the repository at this point in the history
Additional flag fix if BT selected back as primary
  • Loading branch information
rcidt authored Oct 14, 2022
2 parents b49e6a7 + d6b763c commit b9a8c4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ios/RNCallKeep/RNCallKeep.m
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,12 @@ + (void)setup:(NSDictionary *)options {
BOOL isSetted = [myAudioSession setPreferredInput:(AVAudioSessionPortDescription *)port error:&err];

if (isSetted) {
_shouldForceBluetooth = FALSE;
if ([port.portType isEqualToString:AVAudioSessionPortBluetoothHFP] ||
[port.portType isEqualToString:AVAudioSessionPortBluetoothA2DP]) {
_shouldForceBluetooth = TRUE;
} else {
_shouldForceBluetooth = FALSE;
}
}

if(!isSetted){
Expand Down

0 comments on commit b9a8c4b

Please sign in to comment.