ghenry22 / cordova-plugin-music-controls2

A Cordova plugin displaying music controls in notifications (cordova-plugin-music-controls)
MIT License
59 stars 59 forks source link

Notification is not destroyed in Samsung Galaxy S21 plus lock screen #72

Open shantanupks opened 2 years ago

shantanupks commented 2 years ago

Hi, we are using this plugin to show media controls notification, but we are seeing some issues in destroying the notification in Samsung OS (model: Samsung Galaxy S21 plus).

Even after calling MusicControls.destroy(onSuccess, onError);, we are getting success callback, But still the notification can be seen on Lock screen

We see similar issues reported here - https://us.community.samsung.com/t5/Note20/Can-t-remove-media-controls-from-lock-screen-after-One-UI-3-0/td-p/1628685

Exact same call works in other android devices.

We get notification like this on lock screen after MusicControls.create({...}) call

Success Create

However when we call MusicControls.destroy(onSuccess, onError);, we see a different kind of notification (the config object in create does have these properties set)

OS Create

it looks like OS itself is creating default notification after destroy() call? (just a guess).

Any workaround for this would be appreciated, Thanks!

srividya-sharma commented 2 years ago

We are also facing similar issue where the Music Controls are shown even after the app is force closed. Sometimes, the controls go away when app is closed, but reappear after few seconds... "it looks like OS itself is creating default notification after destroy() call? (just a guess)." -- seems to be the case for me also. Were you able to find a solution or workaround for this?

shantanupks commented 2 years ago

Yeah, OS itself is creating it. We are referring already open PR for this - https://github.com/ghenry22/cordova-plugin-music-controls2/pull/61 We were not able to find any permenant solution though!