Controlling an Android phone's audio player via the buttons on the headset?
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.