Skip to content

DaVikingCode/UnityDetectHeadset

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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