Android applications are composed of scattered and associated components and bound together by a project manifest. In manifest, each component and its role are described.
The six components are the foundation of Android applications:
1. intents (intent)
A simple message transmission framework. With intent, You can broadcast messages throughout the system or send specific activities or services to execute your action intent. The system will decide which (some) target to execute the appropriate behavior.
2. Activities (activity)
The display layer of the application. Each screen corresponds to your application and will be an extension of the activity class. Activity uses views to build the UI to display information and respond to user behaviors. For desktop development, an activity is equivalent to a form. You will learn more about activities in this chapter.
3. broadcast receivers (broadcast receiver)
Consumer of intent broadcast ". By creating and registering a broadcast receiver, an application can listen to intent broadcast that meets specific conditions. Broadcast receiver automatically starts your Android Application to respond to the new intent. Broadcast receiver is an ideal means for event drivers.
4. Services)
Invisible "workers" in Android applications ". The service component is invisible when it is running, but it is responsible for updating the data source and visible activity, and triggering notifications. They are often used to perform processing that requires continuous operation. When your activity is no longer active or invisible. In Chapter 8th, you will learn how to create a service.
5. Notifications)
User notification framework. Notification is used to prompt users without focus or interrupting their current activity. They are the first choice for service or broadcast receiver to get user attention. For example, when a device receives a text message or an external call, it will notify you by flashing, making a voice, displaying an icon, or displaying a dialog box. In Chapter 8th, you can use notification to trigger these events.
6. Content)
Provides shared data storage. The content provider is used to manage and share applications. Content Provider is the preferred method for data sharing between applications. This means that you can configure your own content provider to access other applications or the content provider exposed by other applications to access their data. The Android device contains several content providers to access useful databases such as contact information. In Chapter 6th, you will learn how to create and use content provider.
Remove the dependency between Android Application Components. You can share and exchange some individual component units with other applications, such as content provider or service-Your and others are third-party.