, - Activity. - onResume, , , , :
As a rule, there is no need to subclass Application. In most cases, static singletones can function in a more modular way. If your singleton needs a global context (for example, to register broadcast receivers), the function to get it is to get a context that internally uses Context.getApplicationContext () when we first build the singleton.
source
share