Context
suggest changeIntroduction
Per Google documentation: “Interface to global information about an application environment. It allows access to application-specific resources and classes, as well as up-calls for application-level operations such as launching activities, broadcasting and receiving intents, etc.”
A Context is the handle those operations go through: resources, the package, starting an activity, and sending a broadcast. It is not a snapshot of the application's data. An Activity is a Context tied to that screen. getApplicationContext() is tied to the process.
Syntax
getApplicationContext()getBaseContext()getContext()this
Remarks
This StackOverflow page has several comprehensive and well written explanations of the concept of Context:
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents