uamp
uamp copied to clipboard
Remove queue button in android auto
Hello. Is it possible to remove/hide queue button in AA interface? I'm trying override getSupportedQueueNavigatorActions() method with no luck
class MyQueueNavigator(mediaSession: MediaSessionCompat
) : TimelineQueueNavigator(mediaSession) {
private val window = Timeline.Window()
override fun getMediaDescription(player: Player, windowIndex: Int): MediaDescriptionCompat =
player.currentTimeline
.getWindow(windowIndex, window, true).tag as MediaDescriptionCompat
override fun getSupportedQueueNavigatorActions(player: Player?): Long {
val enableSkipTo = false // <- FALSE
val enablePrevious = true
val enableNext = true
var actions: Long = 0
if (enableSkipTo) {
actions = actions or PlaybackStateCompat.ACTION_SKIP_TO_QUEUE_ITEM
}
if (enablePrevious) {
actions = actions or PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS
}
if (enableNext) {
actions = actions or PlaybackStateCompat.ACTION_SKIP_TO_NEXT
}
return actions
}
}
Same issue with screenshots here: stackoverflow
You can set an empty queue on mediaSession.
override fun getSupportedQueueNavigatorActions(player: Player): Long {
mediaConnector.mediaSession.setQueue(listOf())
...
}