Android Core Topics: (App Components)
Android Core Topics: (App Components)
PERITO, MSIS
Subject Instructor
Free Electives 3
ANDROID CORE
TOPICS
(APP COMPONENTS)
App Components
are the essential building blocks of an
Android app.
each component is an entry point through
which the system or a user can enter your
app. Some components depend on others.
Source: https://developer.android.com/guide/
Four Different Type of App
Components
Activities
Services
Broadcast receivers
Content providers
Source: https://developer.android.com/guide/
Activity
Source: https://developer.android.com/guide/
Services
is a general-purpose entry point for
keeping an app running in the background
for all kinds of reasons.
is a component that runs in the
background to perform long-running
operations or to perform work for remote
processes. A service does not provide a
user interface.
Source: https://developer.android.com/guide/
Broadcast Receiver/s
is a component that enables the
system to deliver events to the app
outside of a regular user flow, allowing
the app to respond to system-wide
broadcast announcements.
Each broadcast receiver is delivered
as an Intent object.
Source: https://developer.android.com/guide/
Content Provider/s
manages a shared set of app data that
you can store in the file system, in a
SQLite database, on the web, or on any
other persistent storage location that
your app can access.
Through the content provider, other apps
can query or modify the data if the
content provider allows it.
Source: https://developer.android.com/guide/
ACTIVATING
COMPONENTS
Three of the four component types—
activities, services, and broadcast
receivers—are activated by an
asynchronous message called
an intent. Intents bind individual
components to each other at runtime.
Source: https://developer.android.com/guide/
On the other hand, content providers are
not activated by intents. Rather, they are
activated when targeted by a request
from a ContentResolver.
This leaves a layer of abstraction
between the content provider and the
component requesting information (for
security).
Source: https://developer.android.com/guide/