Android: resume too slow

Hi!

my game takes a lot of time (up to 10 seconds in some slow devices) when resuming after being deactivated, having users telling me that the game failed to resume (when it’s just being slow)

Is there any way to show a progress bar while resuming? (as far as I know I don’t have control over the game until everything has been reloaded)

Thanks!
Kak

Hi,
there is a way to add simple animation to display during resume, you will need to make your own implementation of resumer. the default one rotates texture, you can use it like this in your game load method:

#if ANDROID
            this.Window.SetResumer(new ResumeManager(this.Services,
            spriteBatch,
            "you texture",
            1.0f, 0.01f));
#endif

but as far as i know this whole thing is a bug on the xamarin side, and it was reported to be fixed in january, but i still don’t see anything changed with new xamarin updates…

not only it seems not to be working to me, but in never resumes again when using this function :slight_smile:

I’ll leave as is, right now I’m too stressed dealing with Android problems for so many days. I’ll try to contact xamarin then.

Thanks a lot!
Kak

Hi!

found a decent “native” alternative. Call

pleaseWaitDialog = ProgressDialog.Show (this, “Loading”, “Please wait”,true);

at Activity.OnResume. Close later with pleaseWaitDialog.Dismiss()

Hi again :slight_smile:

I gave the Monogame resumer another go, and it seems to be working without major problems, at least on my devices :slight_smile: