Android 12 Developer Preview is here! Try it out, and give us your feedback!

androidx.media.session

Classes

MediaButtonReceiver A media button receiver receives and helps translate hardware media playback buttons, such as those found on wired and wireless headsets, into the appropriate callbacks in your app.