Headset Detector plugin
This plugin allows a ds application to be notified when wired or bluetooth headphones/speakers are connected/disconnected. It also provides events for media bottons, IE bluetooth buttons. Finally, audio focus functionality is now added.
Audio focus allows your app to request other apps on the system to pause/stop while your app plays media, and allows your app to be notified when other apps request focus.
Useful for media players, recording apps, and more.
The docs have examples, and the plugin is very easy to use.
The zip file includes the source code. In compliance with the upload rules, no binary is provided. If you'd like to download an installer, you can get it here.
Please see the docs for credits, I had a lot of help.
firstname.lastname@example.org for questions/feedback.
Info for 2.0: