Possible Duplicate:
What is Context in Android?
I think its a very interesting question: What is the "context" meaning/concept in Android ?
Almost any things/object need context to working properly. What is the "context" represented? An integer ? a block of memory ?? or .....
Definition. it's the context of current state of the application/object. It lets newly-created objects understand what has been going on. Typically, you call it to get information regarding another part of your program (activity and package/application).
A Context provides access to information about the application state. It provides Activities, Fragments, and Services access to resource files, images, themes/styles, and external directory locations.
A context menu is a floating menu that appears when the user performs a long-click on an element. It provides actions that affect the selected content or context frame.
context. startActivity(new Intent(context, ActivityClass. class)); This call to startActivity sends the Intent to the Android system, which is then in charge of creating and opening the activity that you have specified.
Interface to global information about an application environment. This is an abstract class whose implementation is provided by the Android system. 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.
Source: http://developer.android.com/reference/android/content/Context.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With