Skip to content

Duplicate actions in notification controller on Android 13+ #2321

Description

@ouabing

Describe the Bug
I've got reports from my users who uses ColorOS 13+(which is the default system on some OnePlus and Oppo devices), they found duplicate rewind and ff actions in notification controller. After digging for a while, I found KotlinAudio will add custom actions for rewind, ff and stop actions on Android 13+ aligning with the official behavior change, it still attempt to add these actions to ExoPlayer, which may result in duplicate actions on some custom Android system.

I have already create a PR to solve this issue, I'm posting this bug report here to see if there are any scenerios I might have missed.

20240531-144645

Steps To Reproduce
Add Capability.JumpForward, Capability.JumpBackward or Capability.Stop to capabilities when invoking updateOptions

Code To Reproduce

Playback.updateOptions({
  forwardJumpInterval: 15,
  capabilities: [
    Capability.Play,
    Capability.JumpForward,
    Capability.JumpBackward
  ]
})

Replicable on Example App?
Yes

Environment Info:
Paste the results of npx react-native info
0.73.8
Paste the exact react-native-track-player version you are using
4.1.1
Real device? Or simulator?
OnePlus Ace3
What OS are you running?
ColorOS 14(Based on Android 14)

How I can Help
See PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions