MonoGame Android App Not Resuming

I have done this by adding flag:

bool _exit = false;

update:

  if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
      HandleBackButton();

  if (_exit)
  {
      _exit = false;
      Game.Activity.MoveTaskToBack(true);
  }

and

void HandleBackButton()
{
    _exit = true;
}
3 Likes