.Net MAUI keep app alive in the background without a service - Android

1.7k Views Asked by At

.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

0

There are 0 best solutions below