androidx / androidx/media

MediaMetadataCompat title item, how avoid clickable or browsing - Android Auto

Open
#1,720 6 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

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

Description

Hi I am facing an issue using MediaMetadataCompat for Android Auto extension apps. I am trying to create a head title before the items, but that title has the click feautre active to browse or play and I do not the way to disable it, so I do not want it as clickable, only just as a header

            val headerMediaItem = MediaMetadataCompat.Builder().apply {
                putString(MediaMetadataCompat.METADATA_KEY_MEDIA_ID, "HEADER_ID")
                putString(MediaMetadataCompat.METADATA_KEY_TITLE, "Header items title")
                flag = MediaBrowserCompat.MediaItem.FLAG_PLAYABLE // FLAG_BROWSABLE both are clickables
            }.build()

I guess it must to be a way to create "dumb" items, not playable, not browsable, but I did not figured out.

Thanks in advance

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.