The essential building blocks of an Android application are called components.
Each type serves a distinct purpose and has a distinct lifecycle that defines how the component is created
and destroyed.
The communication between these components is done using messages called intense.
It is important to note that all these components need to be listed in the Android manifest dot sml
file.
These four components are listed on the screen.
An activity is the entry point for interacting with the user.
It represents a single screen with a user interface.
Each activity is independent from others services.
A service is a general purpose entry point for keeping an app running in the background for all kinds
of reasons.
It is a component that trons in the background to perform long running operations or to perform work
for remote processes.
A service does not provide a user interface.
Broadcast's receivers, a broadcast receiver is a component that enables the system to deliver events
to the application outside of a regular user flow, allowing the app to respond to system wide broadcast
announcements because broadcast receivers are another well-defined entry into the app.
The system can deliver broadcasts even to apps that aren't currently running, although broadcast receivers
don't display a user interface.
They may create a status by notification to alert the user when a broadcast event occurs.
Content Providers, a content provider, manages a shared set of ABS data that you can store in the
file system in a Ascui Alight database on the Web or on any other persistance storage location that
your app can access through the content provider.
Other apps can query or modify that data if the content provider allows it.
For example, the Android system provides a content provider that manages the user's contact information
as such.
Any app, with the proper permission, can query the content provider to read and write information
about a particular person.