Android Application Components9
Android Application Components9
COMPONENTS
Introduction
"Activities“
"Fragments"
Subsections of an activity, reusable components.
Can be combined in multiple ways within activities.
Activity with fragments.
Services
"Services"
Runs in the background to perform long-running tasks.
Examples: Music playback, fetching data.
Types: Foreground, background, bound services.
Flowchart showing service interactions.
Broadcast Receivers
"Broadcast Receivers
•Listens for system-wide broadcast messages.
•Examples: Battery low, incoming SMS.
•Registered in the manifest or dynamically.
•Graphic: Illustration of broadcast message flow.
Content Providers
"Content Providers"
Manages access to a shared data set.
Example: Contacts, media files.
Enables data sharing between apps.
Graphic: Content provider architecture.
UI Components
"UI Components"
•Views: TextView, Button, ImageView.
•Layouts: LinearLayout, ConstraintLayout.
•Dialogs, menus, widgets.
•Graphic: Screenshot of a sample UI
Navigation Components
"Navigation Components"
•Simplifies app navigation.
•Components: NavHostFragment, NavController.
•Deep linking support.
•Graphic: Navigation flow diagram.
Architecture Components
"Architecture Components"
•ViewModel, LiveData, Room, WorkManager.
•Lifecycle-aware programming.
•Jetpack libraries for robust app design.
•Graphic: Jetpack architecture diagram.
System Services
"Background Work"
•WorkManager for scheduled tasks.
•JobScheduler, AlarmManager, Services
•Graphic: Diagram of background task flow
Debugging and Testing