Context literal meaning contexts, located in the framework Package Android.content.Context, in fact, the class is a long type, similar to the handle handle in Win32, many methods need to pass the context to identify the caller's instance.
The first argument to toast, for example, is the context. Generally in the activity we use this instead, on behalf of the caller's instance for activity, and to a button of the onclick (view view) and other methods, we use this when the error, So we might use activityname.this to solve the problem, mainly because the class that implements the context has several models specific to Android, Activity, service, and Broadcastreceiver.
The general method that requires a context instance is a variety of service-implemented classes, such as Sensormanager, which needs to be instantiated
The Getsystemservice (String) method must be executed by the instance of the context, and there are some private file system I/O such as
Openfileinput and Maketext methods for commonly used toasts.
Android.content.Context Meaning and use