O'Reilly logo
  • Aldene Villardo thinks this is interesting:

When writing an Android app you’re guaranteed to only have one instance of the android.app.Application class, so it’s safe (and recommended by the Google Android team) to treat it as a singleton. That is, you can safely add a static getInstance() method to your Application implementation. Example 2-2 provides an example.


Cover of Android Cookbook, 2nd Edition


The Application class, or your subclass of the Application class, is instantiated before any other class when the process for your application/package is created.