enterForeground

Called when the app goes to background (from Activity.onStop, before disconnect).

The media notification stays posted for as long as the service is in the foreground, so this only brings its content up to date. startForeground() is called once when playback starts (within the onStartCommand window); after that the notification is only ever updated by notifying — never by calling startForeground() again — to avoid ForegroundServiceStartNotAllowedException on Android 12+.