Application components are very important for the development of Android applications. There are four main components described below:
- Activities: As the name suggests, an activity is an event or action that is performed on the screen. For example, the message application will have an activity on opening the application to show new messages if received any.
- Broadcast Receivers: Broadcast receivers are responsible for handling all the communication between the operating system and applications. For example, you downloaded an application on your android system and that is added to system applications in the settings. This way Android OS communicates with the applications and makes changes based on that communication.
- Services: This component is a background running process responsible for performing operations. For example, some components of an android application keep running in the background to fetch the latest information.
- Content Providers: As the name suggests Content providers which means it provides data from one application to another application whenever requested. These requests are handled by a method called ContentResolver.