a few weeks ago I already looked into adding a simple headset button click event into my Headset Plug Status Extension
however this seems to be more complex than it looks like… also different Android versions will work differently…
I tried
but both unfortunately did not work on my Android 8 device.
There also is this solution
and probably one day I will take some time to try that…
However I can’t promise, that I will be able to provide a working solution
Taifun