.NET Maui (Android) I need to keep an app playing music in the background even if it's not focused.
I searched and found most research redirects to use a service.
I do many calculations and I call APIs on regular bases to update the stream so I'm not sure if using a service is the best choice as I need to stay connected with the stream from the app.
I tired to override OnPause as following
protected override void OnPause()
{
base.OnPause();
}
But not sure if that will do the trick