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
- onLoadChildren method check if parentMediaId match to the id then return the function and not allow browsing
- Tried not giving id into
MediaMetadataCompat.Builder()
, but it crashes the app error isdescription must have a non-empty media id