#StackBounty: #android #button #bluetooth #overriding #headset Custom actions on bluetooth headset buttons

Bounty: 150

I want to add custom actions when a Bluetooth headset / earpiece buttons are pressed.

Apparently for this I need to listen to Media Events using mediaSession.setCallback(callback)function. But for that I need to also play some Media as well, right? I dont want to play any sound. Can I ask MediaSession to play nothing and just receive the media events?

My goal is to override the default Bluetooth headset actions. How can I achieve that? Or any listener that can listen to all Bluetooth buttons.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.