Zend certified PHP/Magento developer

Control playback using headset media buttons when using Android Select to Speak functionality [migrated]

What I ideally want to achieve: TTS for any text I see on my phone, with the user experience similar to my podcast app.

My current approach: Use Android Select to Speak functionality.
This works to read the text on the screen, works in the background, etc which is great. But it totally ignores any attempt to control the playback using media buttons on my headphones.

Question:
How do I make Select to Speak work with media buttons on headphones:

  • Play/pause
  • Skip back/forward (ideally allowing me specify time interval for this)

Or is there an alternative to Select to Speak that works better with media controls?