Skip to content

DaVikingCode/UnityDetectHeadset

Repository files navigation

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

About

Detect if a headphone is plugged on iOS & Android.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published