IT. Expert System.

Android Reference

Application


android.app

Class Application

  • All Implemented Interfaces:
    ComponentCallbacks, ComponentCallbacks2
    Direct Known Subclasses:
    MockApplication


    public class Application
    extends ContextWrapper
    implements ComponentCallbacks2
    Base class for those who need to maintain global application state. You can provide your own implementation by specifying its name in your AndroidManifest.xml's <application> tag, which will cause that class to be instantiated for you when the process for your application/package is created.

    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.

    • Constructor Detail

      • Application

        public Application()
    • Method Detail

      • onCreate

        public void onCreate()
        Called when the application is starting, before any activity, service, or receiver objects (excluding content providers) have been created. Implementations should be as quick as possible (for example using lazy initialization of state) since the time spent in this function directly impacts the performance of starting the first activity, service, or receiver in a process. If you override this method, be sure to call super.onCreate().
      • onTerminate

        public void onTerminate()
        This method is for use in emulated process environments. It will never be called on a production Android device, where processes are removed by simply killing them; no user code (including this callback) is executed when doing so.
      • onConfigurationChanged

        public void onConfigurationChanged(Configuration newConfig)
        Description copied from interface: ComponentCallbacks
        Called by the system when the device configuration changes while your component is running. Note that, unlike activities, other components are never restarted when a configuration changes: they must always deal with the results of the change, such as by re-retrieving resources.

        At the time that this function has been called, your Resources object will have been updated to return resource values matching the new configuration.

        Specified by:
        onConfigurationChanged in interface ComponentCallbacks
        Parameters:
        newConfig - The new device configuration.
      • onLowMemory

        public void onLowMemory()
        Description copied from interface: ComponentCallbacks
        This is called when the overall system is running low on memory, and would like actively running process to try to tighten their belt. While the exact point at which this will be called is not defined, generally it will happen around the time all background process have been killed, that is before reaching the point of killing processes hosting service and foreground UI that we would like to avoid killing.

        Applications that want to be nice can implement this method to release any caches or other unnecessary resources they may be holding on to. The system will perform a gc for you after returning from this method.

        Specified by:
        onLowMemory in interface ComponentCallbacks


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 3260 / . Delta: 0.03883 с