Skip to content

Latest commit

 

History

History
18 lines (11 loc) · 815 Bytes

README.md

File metadata and controls

18 lines (11 loc) · 815 Bytes

UnityDetectHeadset

UnityDetectHeadset is a Unity native plugin which enable to detect if a headphone is plugged on iOS & Android.

To use it, import the Plugins folder and inside your code call: DetectHeadset.Detect();.

Note it will return true on non supported platform.

For Android, you need to add permissions:
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/> <uses-permission android:name="android.permission.BLUETOOTH"/>

Useful references

Create a JAR from Android Studio Project

Create an android library project