cordova-plugin-music-controls2 icon indicating copy to clipboard operation
cordova-plugin-music-controls2 copied to clipboard

Notification icon is no longer shown in the Status Bar (Android)

Open NorthFred opened this issue 1 year ago • 2 comments

With the implementation of the Android 11+ media style notification, the application's (custom) notification icon no longer gets shown in the status bar.

NorthFred avatar Apr 11 '23 14:04 NorthFred

Hello, I have the same issue, do you have any idea ?

romain25 avatar May 25 '23 09:05 romain25

Hello, I find solution.

I start and refresh MusicControls.create with isPlaying with false. So when I change cover or song information, musiccontrol pass Play to Stop and notification disapear.

So I store in variable, when I start, play, pause status of isPlaying


// Begin
var isPlayingStatus = false;

// Play
isPlayingStatus = true;

// MediaError 
// Stop
isPlayingStatus = false;

// Refresh and create MusicControl
MusicControls.create({
...
			isPlaying   : isPlayingStatus,							
....

		}, this.MusicControllerSuccess, this.MusicControllerError);


I hope this help people ;)

romain25 avatar May 25 '23 11:05 romain25