Closed sschaub closed 2 years ago
I was able to work around this in the 1.1.0 version of XMM without resorting to creating a custom build of XMM. I did that by replacing the stock MediaBrowserService with a custom version that impements the technique in #861, using XMM's customization capabilities. For those who might be interested, here's how I did it:
MMMediaBrowserService
that restarts the foreground service (see attached).MMMediaBrowserManager
that overrides the stock MediaBrowserService with MMMediaBrowserService
(see attached)MMMediaBrowserManager
as follows:
CrossMediaManager.Android.MediaBrowserManager = new MMMediaBrowserManager();
CrossMediaManager.Current.Init(this);
🐛 Bug Report
XMM Release: 1.1.0
Android background audio playback stops after a period of time in some scenarios. This occurs in cases where the user pauses media playback and then resumes it. In that scenario, the MediaBrowserService does not restart the foreground service. After a period of time, the OS kills the app due to excessive CPU use.
Expected behavior
The foreground service should be running anytime the app is playing media to prevent the OS from killing the app.
Reproduction steps
Configuration
Version: 1.x
Platform: