Slow app launch on Android

Hi!

My team is having a problem with slow launch of our app on Android devices. After tapping the app icon in the OS to launch the app there is about 5 seconds delay until the splash screen is even displayed. Note that it doesn´t switch to a black screen during this time, just kind of hangs around in the OS which leads testers to tap the app icon multiple times in the OS. Anything we can do, like launch the splash screen directly on tap and let the app load during the splash?

You should use the system level splashscreen.

@Nezz is correct, this will likely be the quickest method on Android. However, it is likely that you are loading a lot of content when you first start your game.

A good multiplatform approach is to create a screen management class, similar to the XNA code example offered by microsoft.

A system like that one allows you to only load content that will be needed immediately in the next screen.

So, for instance:

  • start the game with a splash screen, which only loads a single graphic.
  • while the splash screen is displaying, load content for your next screen (menu?)
  • then, from your menu and all other screens that follow, you load only the next screen needed (maybe scores, maybe gameplay)

This is what I do in my game Tap Ski Extreme, and you will notice it boots up very quickly.
Another reason why this system is good, is that it allows you to dump content that is no longer needed, and free up memory. Example: after showing the splash screen, it is unlikely you want to display your logo or graphic again, so there is no need to keep it loaded

Thank you for the quick replies!

We already do asynchronous loading of content so that shouldn´t be a problem. At the moment we still have the standard monogame system level splash screen and the problem is not that this splash screen takes too long, the problem is that it takes too long before the system level splash screen is even displayed. From tapping the app icon in the OS there is a 5+ seconds delay untill system level splash screen is displayed and at this time everyone get´s the impression that the app has crashed. Note that we do not have this problem on either Windows Phone or iOS.

Does anyone have more ideas we could try?

Chronoxios - I have the same problem with an android game and the time delay seems directly linked to the amount of variables being declared in the main game class. The less there are the quicker the splash screen appears.

Did you find a solution to the problem?

Sunomo

This problem seems to still be here, even with the current last version of Monogame (I’ve compiled the develop branch of Github for Android yesterday). The basic template Monogame application takes at least 3 seconds before to display something, until then, it seems to freeze on the list of my applications, I don’t know what it does during this time.

To compare, I’ve tested the basic template application of Xamarin (so still in C#), and the app appear roughly at the same moment when I touch the app icon, it’s instant!

I’ve just seen that the official version of MonoGame 3.6 has been released (version 3.6.0.1625) so I directly tested to see if this issue still exists with a new Android app, and I’m really glad to see that this is not the case ! :smile: On the same device, the application takes less than 1 second to start !

1 Like