Application, applicationform
Base class for maintaining global application state. You can provide your own implementation by creating a subclass and specifying the fully-qualified name of this subclass as the "android:name" attribute in your AndroidManifest.xml's <application> tag. 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.
The base class used to maintain the global application status. You can create a subclass and run it in AndroidManifest. the "android: name" attribute under the <application> label of xml specifies a fully qualified class name to provide your own implementation. The Application class or the subclass of the Application you created will be instantiated before any class created by your application/package process.
Note: There is normally no need to subclass Application. In most situations, 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), include Context.getApplicationContext() as a Context argument when invoking your singleton's getInstance() method.
Note: Generally, Application subclass is not required. In most cases, static Singleton classes provide the same functionality in a more modular manner. If your Singleton class requires a global context (for example, registering a broadcast receiver), The getInstance () method of your Singleton class contains Context. getApplicationContext () is used as Context.