1

I'm developing the android auto streaming app(media support), in which I want to display the program list

I have displayed the program by giving the flag MediaItem.FLAG_BROWSABLE into MediaMetadataCompat.Builder and attach it to the root list

like below

MediaMetadataCompat.Builder().apply {
                        id = "program"
                        displayTitle = "program name"                          
                        flag = MediaItem.FLAG_BROWSABLE
                    }.build()

My question is can I disable the click of the MediaItem.FLAG_BROWSABLE list?

I have tried

  1. onLoadChildren method check if parentMediaId match to the id then return the function and not allow browsing
  2. Tried not giving id into MediaMetadataCompat.Builder(), but it crashes the app error is description must have a non-empty media id
Mittal Varsani
  • 5,601
  • 2
  • 15
  • 27

0 Answers0