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.
What Is Android?
Android is an open-source mobile operating system developed by Google, primarily designed for touchscreen devices such as smartphones, tablets, smart TVs, wearables, and automotive systems.
Key Points
🔸 Based on Linux Kernel
🔸 Written mainly in Java, Kotlin, and C/C++
🔸 Apps run inside a sandboxed environment
🔸 Highly customizable by device manufacturers
Android Architecture (Layered Design)
Android follows a layered architecture, where each layer has a specific responsibility.
Android Architecture Layers (Top to Bottom)
1. Applications Layer
This is the topmost layer, visible to users.
Examples:
🔸 Phone
🔸 Messages
🔸 Camera
🔸 WhatsApp
🔸 Instagram
🔸 Chrome
Key characteristics:
🔸 Written using Java/Kotlin
🔸 Each app runs in its own process
🔸 Secure through application sandboxing
2. Application Framework
This layer provides APIs and system services used by applications.
Important components:
🔸 Activity Manager – Manages activity lifecycle
🔸 Window Manager – Manages windows and UI
🔸 Content Providers – Enables data sharing between apps
🔸 Notification Manager – Handles notifications
🔸 Resource Manager – Manages strings, layouts, and images
🔸 Developers interact mostly with this layer
3. Android Runtime (ART)
ART is responsible for running Android applications.
Key features:
🔸 Ahead-of-Time (AOT) compilation
🔸 Garbage collection
🔸 Memory optimization
🔸 Improved app performance
🔸 Replaced Dalvik Virtual Machine
🔸 Each app runs in its own runtime instance
4. Native Libraries
These libraries are written in C/C++ and provide low-level functionality.
Examples:
🔸 SQLite – Database management
🔸 OpenGL ES – Graphics rendering
🔸 WebKit – Web browser engine
🔸 Media Framework – Audio and video playback
🔸 Accessed through Android Framework APIs
5. Linux Kernel (Core Layer)
This is the foundation of the Android operating system.
Responsibilities:
🔸 Process management
🔸 Memory management
🔸 Device drivers
🔸 Power management
🔸 Security
🔸 Ensures hardware abstraction
🔸 Optimized Linux kernel for mobile devices
Core Android Application Components
Every Android application is built using four main components.
1. Activity
Represents a single screen with a user interface.
Examples:
🔸 Login screen
🔸 Dashboard screen
Key points:
🔸 Has a lifecycle (onCreate, onStart, onResume, etc.)
🔸 Managed by the Activity Manager
2. Service
Used to perform background operations without a user interface.
Examples:
🔸 Music playback
🔸 File uploads
🔸 Data synchronization
Types of services:
🔸 Foreground Service
🔸 Background Service
🔸 Bound Service
3. Broadcast Receiver
Listens for system-wide or application-level events.
Examples:
🔸 Battery low
🔸 Internet connectivity change
🔸 SMS received
Key characteristics:
🔸 Does not have a UI
🔸 Short-lived component
4. Content Provider
Used to share data between applications.
Examples:
🔸 Contacts
🔸 Media Store
Key points:
🔸 Uses URI-based access
🔸 Enforces permissions for data security
Android App Manifest (AndroidManifest.xml)
The Android Manifest file acts as the control center of an application.
It defines:
🔸 Application components
🔸 Required permissions
🔸 App name and icon
🔸 Minimum SDK version
🔸 Entry (launcher) activity
Example:
Key Android Features
1. Open Source
🔸 Developers can inspect and modify the source code
🔸 Encourages innovation and customization
2. Multitasking
🔸 Multiple applications can run simultaneously
🔸 Efficient memory and process management
3. Security
🔸 Application sandboxing
🔸 Permission-based access control
🔸 Secure inter-process communication
4. Hardware Support
🔸 Camera
🔸 GPS
🔸 Bluetooth
🔸 Sensors such as accelerometer and gyroscope
5. Rich UI and Customization
🔸 Material Design support
🔸 Custom themes
🔸 Smooth animations and transitions
6. Connectivity
🔸 Wi-Fi
🔸 Bluetooth
🔸 NFC
🔸 Cellular networks (4G and 5G)
Why Android Architecture Matters (Interview Point)
🔸 Clear separation of concerns
🔸 Better performance
🔸 High scalability
🔸 Strong security isolation
🔸 Easy maintenance and updates
Interview Tip:
Android architecture allows developers to build scalable, secure, and performance-optimized applications.
Quick Revision
🔸 Android – Open-source mobile operating system
🔸 Architecture – Layered software stack
🔸 Components – Activity, Service, Broadcast Receiver, Content Provider
🔸 Runtime – ART executes applications
🔸 Kernel – Manages hardware and memory
🔸 Features – Secure, customizable, multitasking
Become a member
Get the latest news right in your inbox. We never spam!
Comments