What is ‘Context’ on Android?

Technology CommunityCategory: AndroidWhat is ‘Context’ on Android?
VietMX Staff asked 3 years ago

The documentation itself provides a rather straightforward explanation: The Context class is an “Interface to global information about an application environment”.

We may assume a Context is a handle to the system; it provides services like resolving resources, obtaining access to databases and preferences, and so on. An Android app has activities. Context is like a handle to the environment your application is currently running in. The activity object inherits the Context object.