Android application components are essential building blocks of an Android App. Every app is built as a combination of some or all of those components, which can be invoked individually. There are four main components in Android; Activity, Service, Content Providers and Broadcast Receivers, which are explained below :
This android application components to provides a single screen with which users can interact in order to do something. Users can perform operations such as making a call, sending SMS and many more. For example : Application’s login page
A service is a component that runs in the background to perform long-running operations. For example, a service might play music in the background while the user is in a different application, or it might fetch data over the network without blocking user interaction with an activity.
- Content Providers
Thisandroid application components is to provide data to external applications. Content Providers can be treated as interfaces that connect data in one process with code running in another process. For example, by using Content Providers, any application can read SMS from inbuilt SMS application repository in our device. but before reading the SMS, the READ_SMS permission must be declared in the application’s AndroidManifest.xml file in order to access SMS application’s data.
- Broadcast Receivers
Thisandroid application components is to responds to system-wide broadcast announcements such as Battery Low, boot completed, headset plug and many more.
There are additional components which will be used in the construction of above mentioned entities, their logic, and wiring between them. These components are :
Represents a portion of user interface in an Activity.
UI elements that are drawn on-screen including buttons, lists forms etc.
View hierarchies that control screen format and appearance of the views.
Messages wiring components together.
External elements, such as strings, constants and drawable pictures.
Configuration file for the application.