In android, the Context parameter needs to be passed in many methods. But what exactly does this mean?
Activity is also inherited from Context
Context literally refers to the Context, which is located in the android. content. Context of the framework package. In fact, this class is of the LONG type, similar to the Handle in Win32. Many methods need to use Context to identify the caller's instance. For example, the first parameter of Toast is Context. Generally, this is directly used in the Activity to represent that the caller's instance is Activity, when the onClick (View view) method of a button is used, an error is reported when this method is used. Therefore, ActivityName may be used. this is mainly because the classes that implement Context mainly have several models unique to Android, Activity and Service. Context provides an interface for global information about the application environment. It is an abstract class and its execution is provided by the Android system. It allows you to obtain resources and types characterized by applications. Start application-level operations at the same time, such as starting Activity, broadcasting, and receiving intents