In terms of desktop development, anActivityis equivalent to a Form. It contens UI elements that display for you, and can respond to your actions.
In AndroidManifest.xml, you have to let Android know the list of all the components that make up you application. You also have to tell the Android what's your requirements on hardware and what Permission do you want the Android to offer to you.
An intent
is an abstract description of an operation to be performed.
Intent can invoke Activity, Service and BroadcastReceiver.
A BroadcastReceiverisa base class for code that will receive intents sent by sendBroadcast().
Ifregistering a receiver in your Activity.onResume()implementation, you shouldunregister it in Activity.onPause().
Using implicit Intents to request an action be performed on a piece of data, letting Android determine which application components can best service that request.
Broadcast Intents are used toannounce eventssystem-wide. you can receive them using Broadcast Receivers.
Adapters and used the to bind your presentation layer to data sources.
ListActivity is an activity that displays a list of items by binding to a data source such as an array or Cursor, and exposes event handlers when the user selects an item.
An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View).
An activity uses IntentFilter to let the Android knows its ability.
-Action :
SourceActivity: what kind of ablitity that the target must meet to perform this action. it tells the Android its request. (e.g.ACTION_EDIT tells the Android that the target must can edit.)
Target Activity: what kind of action that this activity can perform.(such as ACTION_CALL, ACTION_EDIT, ACTION_MAIN, etc.)
-Data : the uri of the data that the target activity will perform action on.
-Extras: like a map, we can suppose it is a excel blank that both the Source Activity can write into a key-value, and Target Activity can read by some key from it.
Every application runs in a separate process on its own instance of Dalvik VM.
It is a better way to understandIntentas arequest. It's a noun, it contains your requestion.
An Activity is an interface between the end-use and your application. The end-use communicate with your application through the it. It is a containter too, you put you view components in it.
A Handler allows you to send and process Message and Runnable objects associated with a thread's MessageQueue.
Each Handlerinstance is associated with a single
thread and that thread's message queue.
Handler.post(Runnable r)
Causes the Runnable r to be added to the message queue.
The runnable will be run on the thread to which this handler is attached.
All Android application components — including Activities, Services, andBroadcast Receivers — start on the main application thread. As a result,time-consuming processing in any component will block
all other componentsincluding Services and the visible Activity.
To ensure that your applications remain
responsive, it’s good practice to move all slow, time-consumingoperations off the main application thread and onto a child
thread.