DEV Community

Discussion on: Android Vitals - Is this a cold start? 🦋

Collapse
 
vishugupta86 profile image
vishugupta86 • Edited

Cold Start - "in cases such as your app’s being launched for the first time since the device booted, or since the system killed the app"
Warm Start - "The system evicts your app from memory, and then the user re-launches it.

Really confused with this. While our app is in background, system kills it because of low memory and restores when we launch it again, this is Cold or Warm start ? Is System killing the app different from system evicting your app from memory !!

Collapse
 
pyricau profile image
Py ⚔

That's a great question, and you're right, the documentation is confusing.

The main difference seem to be about whether the activity is created with a restored state bundle. If the system starts an activity from scratch with no saved state, it's a cold start. If it starts the process then relaunches an activity with a restored state then they assume there's going to be less work to do so they call it a warm start. I'm not quite convinced that a restored state yields much less work..