Android Cold Start aka Splash Screen

Bhavna Haritsa
3 min readMay 1, 2020

I felt the importance to write this blog especially knowing that this is not such a big topic or maybe important too but despite all that, I felt the need to pen down on this just to throw light on what you can do when you use “Cold Start” for your intro screen and when you use a separate “Activity” to create the splash screen.

Before we start, it is fundamental to understand what a splash screen is.

A splash screen is mostly the first screen of the app when it is opened. It is a constant screen that appears for a specific amount of time, generally shows for the first time when the app is launched.

Splash screen of an application (from Google)
Splash screen of an application (from Google)

First of all, the purpose of both is solely the same which is to create a splash screen at the beginning of your applications. Recently, when I contributed to an application in GitHub, I was to develop this splash screen, very simple in fact just a logo and not even the app name under it. I thought easy-peasy, no big deal and I’d finish it in minutes. But when I raised the pull request for it, I realized there was more debate on which method we would use, the cold start or open a whole new activity just for a splash screen. But then, I thought, the best way to find about anything ( in tech and life :P) is to analyse the pros and cons of it. So, let’s dive into the pros and cons of this one too.

If you just want to build a starting page of an application that just shows the drawable you have designed with no advanced features, then I feel Cold Start is a good method to use. That is the only pro I can think of about it as of now. But, let me tell you the cons of it.

  1. You cannot implement any animations. Cold start is all about attaching a drawable file on the Style theme in the item-tag “windowsBackground”, so animations is quite not possible in this method. For animations to show up, you need to implement or extend the Animations class in android and paste files separately in it as parameters, which would specify effects like fade_in, fade_out, or whatever effect you want.
  2. Decision making or other features cannot be implemented. Sometimes, in complex apps or high-scaled apps, some data, features, or even decision making happens before entering the app and to get such information is only possible in the activity.

It’s better to explain with an example. Suppose you have an application already in use in which you have logged in or signed in. Now, for some reason, you have killed the app. When you open the app again, the app should decide whether to log in or register(sign in) again or has it saved your data. Or sometimes, if it is an app dealing with location tracking, though the service runs in the background, the splash screen can be used to call the service and track your current location. Most of the data can be retrieved at the beginning of the app and major permissions can be granted which won’t trouble the user in the later stages of the app and so on. On the whole, we have an entire activity in which we can create all these functionalities, permissions and basically anything we want to do.

3. It is not easy to create complex layouts when you use drawable.

When you add images in drawables, it has to be converted into a bitmap and then displayed which is kind of cumbersome and you cannot see the view of your screen like in the design tab in case you want to design complex layouts. But in activity, in the XML file of the activity, you can see what’s going on, align textviews, imageviews and any other view you want accordingly and also use different types of layouts.

These are the 3 points I feel are the major drawbacks when it comes to using Cold Start for the display of Splash Screens. But, if you would ask me which method to use preferably, I would suggest the Activity method as it is very evident from the cons mentioned above.

Thank you and Happy Coding!! :D

Bhavna.

--

--