tanguyantoine / react-native-music-control

Display and manage media controls on lock screen and notification center for iOS and Android.
https://www.npmjs.com/package/react-native-music-control
MIT License
697 stars 264 forks source link

[Android] A weird behave on lockscreen on Samsung Real Device #374

Open ithustle opened 3 years ago

ithustle commented 3 years ago

Description

  1. Sample code (provide repo url or sample code)

When I touch on pause control the song is paused but change description song to previous track played.

const remoteControls = () => {
        MusicControl.on(Command.pause, () => {
            props.pauseSong();
            MusicControl.updatePlayback({
                state: MusicControl.STATE_PAUSED,
            });
        })

        MusicControl.on(Command.play, () => {
            props.resumeSong();
            MusicControl.updatePlayback({
                state: MusicControl.STATE_PLAYING,
            });
        })
    }

I called remoteControls() functions on useEffect.

  1. Platform ?

    • [ ] iOS
    • [x] Android
3. Device - [ ] Simulator - [x] Real device