Donnerstag, 6. Februar 2014

Making a case for android.app.Application

In the documentation of android.app.Application it says:
There is normally no need to subclass Application. In most situation, static singletons can provide the same functionality in a more modular way. If your singleton needs a global context (for example to register broadcast receivers), the function to retrieve it can be given a Context which internally uses Context.getApplicationContext() when first constructing the singleton.
But is that right? Or it there is a case for android.app.Application?