The issue is that a single music track is playing twice simultaneously in ExoPlayer
In an Android project developed with Jetpack Compose, I am using ExoPlayer to play music and simultaneously show a notification to the user that music is playing. However, the problem is that the music plays both from the notification and from the player I created, causing the music to play twice simultaneously. When I stop the music from the notification, it works correctly and only one sound plays. To completely stop the music, I have to stop both the notification and the music player simultaneously. I am using a service to play the music and have delegated handling the notification to ExoPlayer. How can I prevent this issue and ensure that the sound plays only once?