We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a30e79 commit 474541fCopy full SHA for 474541f
Android/src/com/davikingcode/DetectHeadset/DetectHeadset.java
@@ -13,7 +13,8 @@ public DetectHeadset(Context context) {
13
}
14
15
public boolean _Detect() {
16
-
17
- return myAudioManager.isWiredHeadsetOn();
+ if(myAudioManager.isWiredHeadsetOn() || myAudioManager.isBluetoothA2dpOn()){
+ return true;
18
+ }else false;
19
20
Assets/Plugins/iOS/DetectHeadset.mm
@@ -9,6 +9,8 @@ bool _Detect() {
9
for (AVAudioSessionPortDescription* desc in [route outputs]) {
10
if ([[desc portType] isEqualToString:AVAudioSessionPortHeadphones])
11
return true;
12
+ if ([[desc portType] isEqualToString:AVAudioSessionPortBluetoothHFP])
return false;
0 commit comments