Controlling an Android phone's audio player via the buttons on the headset? I am interested in finding documentation about controlling an Android phone's audio player (e.g. play/stop/skip forward 20 seconds) with the buttons on the phone's headset.  Based on my searches this doesn't seem to be a well-documented topic.
Is there another forum in which I should ask this question?
More specifically, I am shopping for a new Android cell phone (I am leaning toward a Moto G Power).  I use my phone as an audio player and would like to buy a phone that:

supports the use of the wired headset button(s) for such functions as play/stop/skip forward 30 seconds and;
supports the use of an app(s) [1]  that control the cell phone audio player and;
Performs 1 &amp; 2 with a wireless headset.

Every few years I find myself looking for information on this topic and never seem to find much that is useful.
Ref.
[1] head set button controller apps such as ...https://play.google.com/store/apps/details?id=com.irishin.buttonsremapperhttps://play.google.com/store/apps/details?id=flar2.homebutton
OLD-https://beebom.com/5-apps-to-control-and-tweak-your-headset-buttons-in-android/
From a hardware perspective, as can be seen here, all Android phones with 3.5mm jack are required to support the following functions: play/pause/hook (Short Press), Trigger Assist (Long Press), Next (Double Press). They can optionally also support: volume up/down. I believe that these days all new phones support all of them.
It's then up to each specific application (e.g. a music player) to make use of these capabilities. Here too, I also believe that most of them do. Of course you also need your headphones to come with the relevant buttons.