Skip to content

Commit

Permalink
Merge pull request react-native-voice#161 from dev-yakuza/issue-155-l…
Browse files Browse the repository at this point in the history
…ost-bluetooth-connection

[issue 155: bluetooth earphone connection lost]
  • Loading branch information
sibelius authored Apr 18, 2019
2 parents 99c9526 + 8817cad commit 38b5ac4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/Voice/Voice.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ -(BOOL) setupAudioSession {
- (BOOL)isHeadsetPluggedIn {
AVAudioSessionRouteDescription* route = [[AVAudioSession sharedInstance] currentRoute];
for (AVAudioSessionPortDescription* desc in [route outputs]) {
if ([[desc portType] isEqualToString:AVAudioSessionPortHeadphones])
if ([[desc portType] isEqualToString:AVAudioSessionPortHeadphones] || [[desc portType] isEqualToString:AVAudioSessionPortBluetoothA2DP])
return YES;
}
return NO;
Expand Down

0 comments on commit 38b5ac4

Please sign in to comment.