diff --git a/MediaManager/Platforms/Android/MediaSession/MediaBrowserService.cs b/MediaManager/Platforms/Android/MediaSession/MediaBrowserService.cs index 99236a50..7cc96893 100644 --- a/MediaManager/Platforms/Android/MediaSession/MediaBrowserService.cs +++ b/MediaManager/Platforms/Android/MediaSession/MediaBrowserService.cs @@ -141,7 +141,14 @@ protected virtual void PrepareNotificationManager() if (ongoing && !IsForeground) { ContextCompat.StartForegroundService(ApplicationContext, new Intent(ApplicationContext, MediaBrowserManager.ServiceType)); - StartForeground(notificationId, notification, ForegroundService.TypeMediaPlayback); + if (Build.VERSION.SdkInt >= BuildVersionCodes.S) + { + StartForeground(notificationId, notification, ForegroundService.TypeMediaPlayback); + } + else + { + StartForeground(notificationId, notification); + } IsForeground = true; } }