Version
Media3 1.6.0
More version details
No response
Devices that reproduce the issue
any
Devices that do not reproduce the issue
N/A
Reproducible in the demo app?
Yes
Reproduction steps
setForegroundServiceTimeoutMs(120000)
setMediaNotificationProvider(
DefaultMediaNotificationProvider.Builder(this)
.build()
.also { it.setSmallIcon(androidx.media3.session.R.drawable.media3_icon_heart_filled) }
)
in onCreate
Expected result
Heart icon in notification
Actual result
Custom media notification provider is not applied, default provider (-> default icon) is used.
setForegroundServiceTimeoutMs instantiates the MediaNotificationManager, which reads from this.mediaNotificationProvider field, but if we set the field after manager is already created, nothing will happen.
I believe this should be documented, and setMediaNotificationProvider() should just throw IllegalStateException if MediaNotificationManager already created.
Media
Not applicable
Bug Report