androidx / androidx/media

About the notification listener permission

Open
#3,179 5 comments 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since Apr 17, 2026.

enhancement
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

It's required to get notification listener permission in order to be able to query the active media sessions and interact with them.

That is a major pain for various reasons, such as:

  1. Users being rightfully scared by granting such a powerful permission
  2. Play Protect flagging roughly 100% of non-Play-distributed apps with that permission as malware once a certain install threshold is reached, forcing you to appeal
  3. Having granted notification listener permission forces the app to stay running in background 24/7 (can be observed in Developer options > Running services), which is convenient for some use cases (such as scrobbler app) but also totally wasteful use of RAM for others

Could it be considered to create a new permission, purely for media session access, as seperate, less sensitive permission? I think notification listener permission should keep it's rights for accessing media session, but there should be a second way which is easier to sell to the user.

I'm aware this is not actionable immediately because it will require internal discussion & prioritization and even if that leads to a favourable outcome, a new platform version will still need to be released. I'm offering this purely as async feedback so you know of this pain point. Thanks for considering!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.