How do I use the Headphone Button as a "Button"?

I want to create an app that triggers an event when the button in an earphone/headphone is clicked.


For example, in YouTube (or most music apps), the button press cause the play/pause (:play_or_pause_button:) event. Also, long click & double click trigger some other events.


So, is it possible in MIT AI2, maybe using an extension?

Hello Kaustubh

If the headphones use Bluetooth to communicate with the phone, there might be a chance. Otherwise, I suspect not.

Taifun has an extension that detects whether or not a head phone cable (jack) is plugged in: https://puravidaapps.com/headset.php

1 Like