Android | Android Context | Different Types Of Context | Application Context | Activity Context | getContext()
Android | Context What is context in android? Context is an interface to global information about an application environment. This is an abstract class whose implementation is provided by the Android system. Context is the context of the current state of the application/object. It lets newly-created objects understand what has been going on. It allows access to application resources, classes as well as up-calls for application-level operations such as launching activities, broadcasting and receiving intents, etc. It allows our application components to interact with the outside android environment like local files, databases, class loaders associated to the environment, services including system-level services, and more. There are many different types of context in android. Wrong use of context can easily lead to memory leak in an android application. So, let's give a look to ...