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.
2 parents bd80852 + 2437454 commit b5d5f26Copy full SHA for b5d5f26
Assets/Plugins/DetectHeadset.cs
@@ -9,7 +9,7 @@ public class DetectHeadset {
9
10
static public bool Detect() {
11
12
- #if UNITY_IOS
+ #if UNITY_IOS && !UNITY_EDITOR
13
return _Detect();
14
15
#elif UNITY_ANDROID && !UNITY_EDITOR
Assets/Plugins/iOS/DetectHeadset.mm
@@ -11,10 +11,14 @@ bool _Detect() {
return true;
if ([[desc portType] isEqualToString:AVAudioSessionPortBluetoothHFP])
+ //It was displaying this route for bluetooth wireless headphones.
+ //Tested with Unity 2019.1
16
+ if ([[desc portType] isEqualToString:AVAudioSessionPortBluetoothA2DP])
17
+ return true;
18
}
19
20
return false;
21
22
23
-}
24
+}
0 commit comments