How to keep the same order of custom media actions
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I want to use custom next/previous actions instead of the native ones. So I started by removing the native ones by allowing only needed actions: But in some devices
```
MediaSessionConnector(mediaSession).setCustomActionProviders(object :
MediaSessionConnector.CustomActionProvider {
override fun onCustomAction(player: Player, action: String, extras: Bundle?) {}
override fun getCustomAction(player: Player): PlaybackStateCompat.CustomAction? {
return PlaybackStateCompat.CustomAction.Builder(
"SKIP_TO_PREVIOUS_ACTION",
"previous",
if (!isFirst)
R.drawable.ic_previous_with_padding
else R.drawable.ic_previous_disabled_with_padding
).build()
}
},
object : MediaSessionConnector.CustomActionProvider {
override fun onCustomAction(player: Player, action: String, extras: Bundle?) {}
override fun getCustomAction(player: Player): PlaybackStateCompat.CustomAction? {
return PlaybackStateCompat.CustomAction.Builder(
"SKIP_TO_NEXT_ACTION",
"next",
if (!isLast)
R.drawable.ic_next_with_padding
else R.drawable.ic_next_disabled_with_padding
).build()
}
}
```


As you observed, the buttons in the home section are inverted, how can I keep the same order as in the app? But in some devices its working fine
Any idea how we can resolve this?
@phhusson @xian @canatella @kiall @talklittle @marcbaechinger
Contributor guide
Assessment
This issue has not been assessed yet.