DEV Community

Discussion on: Android Vitals - Diving into cold start waters 🥶

Collapse
 
pyricau profile image
Py ⚔

Great question! In the Application subclass constructor the base context of the Application instance isn't set up. That means you can't call any of the context related methods, e.g. access the app file system, etc. Probably the same level of safety as doing work on classloading, etc.

Collapse
 
kuanyingchou profile image
Kuan-Ying Chou

Thanks for reply! Does that mean storing a timestamp in memory there is ok-ish?

Thread Thread
 
pyricau profile image
Py ⚔

Yep! I'll cover that topic in more details in a follow up post ;)

Thread Thread
 
kuanyingchou profile image
Kuan-Ying Chou

Nice!