Baseflow / Baseflow/XamarinMediaManager

MAUI Android audio stops after running in the background for about 15 minutes

Open
#900 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
763
Forks
299
PR merge metrics
No merged PRs in 30d

Description

I'm using the latest version (1.2.2) for my MAUI app (.net 7) and I'm having problems running it on Android. After the app goes into the background for about 15 minutes the audio stops and when I go back to the app it restarts instead of resuming the current state. I noticed that on the notification manager there is already a player, so I think it has been registered as a service to be able to run in the background.
I tried to build in release mode but the result is the same. And of course I have turned off the battery saving modes on the devices already. The devices I am testing are Xiaomi, One plus (Android 12 & 13).
Also, I accidentally discovered that if the phone is connected to the charging cable (which is charging) the audio can play for hours in the background.

- Platform: Android (Android 12 & 13)
- MAUI (.net 7)
- Plugin.MediaManager 1.2.2

Contributor guide

Open the contributing guide

Research direction

No source files, tests, or entry points are named. First reproduce the background playback failure on Android 12 or 13 with a MAUI .NET 7 app using Plugin.MediaManager 1.2.2, then inspect the notification manager and player behavior while the phone is unplugged. Done means audio continues after about 15 minutes in the background and the app resumes its current state when reopened.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
audio-video-rtc, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.