Media notifications should be controllable through headset controls
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.3k
- Forks
- 920
- PR merge metrics
- No merged PRs in 30d
Description
Feature description
Media notifications (so, ones made by termux-notification --type media ...) should be able to be triggered by headset buttons. Currently, pressing the media play/pause button on my headphones doesn't trigger any actions on Termux media notifications, while it toggles playback on most other apps. Although, since playing and pausing are separate actions, maybe it'd be a good idea to make an action specific to the headset pause/play button?
Reference implementation
Have you checked if the feature is accessible through the Android API?
https://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_BUTTON, I think?
Do you know of other open-source apps that has a similar feature as the one you want? (Provide links)
Audioserve is one, but most apps (that I've come across) that have media controls support headset controls.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by checking Android's ACTION_MEDIA_BUTTON documentation and the existing termux-notification media behavior. Compare the headset-control handling in Audioserve, then define whether play and pause use existing actions or need a dedicated action; done means headset play/pause controls trigger the intended media notification behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- api, mobile-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100