What is Android and how is it structured internally? Easy
Android is an open-source mobile operating system developed by Google. It is built on top of the Linux kernel and is primarily designed for touch-based devices such as smartphones and tablets.
Internally, Android follows a layered architecture:
Understanding this layered structure helps when debugging system-level issues.
Explain Activity lifecycle in Android. Easy
The Activity lifecycle describes how an activity transitions between states.
The main lifecycle methods include:
In practical development, heavy tasks should not run inside lifecycle methods like onResume(), as it may slow UI rendering.
What is an Intent in Android? Easy
An Intent is a messaging object used to request an action from another component.
There are two types:
Intents are essential for communication between Activities and other app components.
What is a Fragment and why is it used? Easy
A Fragment represents a reusable portion of the UI inside an Activity.
Fragments are useful for:
Fragments share lifecycle with the parent Activity but are lighter and more flexible.
What is RecyclerView and why is it preferred over ListView? Easy
RecyclerView is a flexible view for displaying large datasets efficiently.
It improves performance by recycling views instead of recreating them.
Key components:
RecyclerView supports animations and multiple view types, making it more powerful than ListView.
What is an Activity in Android? Easy
An Activity represents a single screen with a user interface. It is one of the core components of Android applications.
Each Activity follows a defined lifecycle managed by the system.
What are the main components of Android? Easy
The four main Android components are:
Explain Android Activity Lifecycle. Medium
The Activity lifecycle includes:
Understanding lifecycle helps manage resources efficiently.
What is Intent in Android? Easy
Intent is a messaging object used to request an action from another component.
It can be explicit or implicit.
What is a Service in Android? Easy
A Service is a component that runs in the background to perform long-running operations without user interaction.
What is a BroadcastReceiver? Easy
BroadcastReceiver responds to system-wide broadcast announcements.
Example: battery low, network change.
What is a Fragment? Medium
A Fragment represents a reusable portion of UI within an Activity.
Fragments improve modular UI design.
What is RecyclerView? Easy
RecyclerView is a flexible and efficient way to display scrollable lists.
It reuses views for better performance.
What is ANR in Android? Medium
ANR (Application Not Responding) occurs when the app does not respond within 5 seconds on the main thread.
Heavy operations must not run on UI thread.
What is the use of AsyncTask? Medium
AsyncTask was used for background tasks.
It is now deprecated. Developers use Coroutines or WorkManager instead.
What is the difference between Serializable and Parcelable? Medium
Parcelable is Android-specific and faster.
Serializable is standard Java but slower.
What is ViewModel? Medium
ViewModel stores UI-related data and survives configuration changes.
What is LiveData? Medium
LiveData is lifecycle-aware observable data holder.
What is WorkManager? Medium
WorkManager schedules deferrable background tasks that must run even if app exits.
What is ProGuard or R8? Hard
ProGuard/R8 shrinks, optimizes, and obfuscates code for production builds.
What is ANR and how can it be prevented? Medium
ANR stands for Application Not Responding. It occurs when the main thread is blocked for more than 5 seconds.
To prevent ANR:
ANR can severely impact user experience, so performance optimization is critical.
What is ViewModel and why is it important? Medium
ViewModel is part of Android Architecture Components. It stores UI-related data and survives configuration changes such as screen rotation.
Without ViewModel, data would be lost when Activity is recreated.
It helps maintain clean separation between UI and business logic.
Explain MVVM architecture in Android. Medium
MVVM stands for Model-View-ViewModel.
Model handles data.
View handles UI.
ViewModel handles logic and data preparation.
This separation improves testability and maintainability.
What is Dependency Injection in Android? Medium
Dependency Injection is a design pattern where dependencies are provided externally rather than created inside the class.
Popular DI tools in Android:
It reduces tight coupling and improves code testability.
What is the difference between Application Context and Activity Context? Medium
Application Context is tied to the lifecycle of the entire app, while Activity Context is tied to a specific Activity.
Use Application Context for long-lived operations like database access. Use Activity Context when UI-related resources are required.
Using Activity Context improperly may cause memory leaks.
What is the difference between commit() and apply() in SharedPreferences? Easy
commit() saves data synchronously and returns a boolean indicating success.
apply() saves data asynchronously and does not return a result.
apply() is generally preferred because it does not block the main thread.
What is Room Database? Medium
Room is an abstraction layer over SQLite provided by Android Jetpack.
It simplifies database access by using:
Room provides compile-time query verification, reducing runtime crashes.
Explain the difference between foreground and background services. Medium
A foreground service shows a persistent notification and continues running even when the app is not visible.
A background service runs silently and may be stopped by the system in newer Android versions.
Foreground services are used for music players, GPS tracking, etc.
What is StrictMode in Android? Hard
StrictMode is a developer tool that detects accidental disk or network access on the main thread.
It helps identify performance issues early during development.
What is the difference between implicit and explicit broadcasts? Medium
Explicit broadcasts are sent to a specific receiver.
Implicit broadcasts are system-wide and can be received by multiple apps.
Android restricts implicit broadcasts in newer versions for performance reasons.
What is the use of AndroidManifest.xml? Easy
AndroidManifest.xml declares:
It is essential for app configuration and component registration.
What are runtime permissions in Android? Easy
Starting from Android 6.0, dangerous permissions must be requested at runtime.
Examples include:
This improves user privacy and security.
What is View Binding? Medium
View Binding generates a binding class for each XML layout.
It eliminates the need for findViewById() and reduces null pointer exceptions.
What is Content Provider? Medium
Content Providers manage access to structured data.
They allow sharing data between applications securely.
What is Android Jetpack? Easy
Jetpack is a collection of Android libraries that help build robust apps.
It includes components like:
What is the difference between Coroutines and Threads? Hard
Threads are system-level constructs and expensive to create.
Coroutines are lightweight and managed by Kotlin runtime.
Coroutines simplify asynchronous programming significantly.
What is Navigation Component? Medium
Navigation Component simplifies in-app navigation.
It provides a single-activity architecture with a navigation graph.
What is the use of ConstraintLayout? Easy
ConstraintLayout allows flexible positioning of UI elements.
It reduces nested layouts and improves performance.
What is the purpose of Android Keystore? Hard
Android Keystore stores cryptographic keys securely.
Keys stored here cannot be extracted, improving app security.
Explain difference between cold start and warm start. Hard
Cold start occurs when app process is not running.
Warm start occurs when app process is already in memory.
Optimizing cold start improves first impression performance.
Explain the difference between Serializable and Parcelable. Hard
Serializable is a Java interface used for object serialization.
Parcelable is Android-specific and faster because it is optimized for IPC.
Parcelable is preferred in Android development for performance reasons.
How does Android handle memory management? Hard
Android uses garbage collection to free unused memory.
However, developers must avoid memory leaks by:
Proper memory handling prevents app crashes and improves stability.
What is the difference between Service and IntentService? Medium
A Service is a component that runs in the background to perform long-running operations. It runs on the main thread by default, so heavy work must be moved to a separate thread.
IntentService (now deprecated in newer APIs) was a subclass of Service that handled asynchronous requests on a worker thread automatically and stopped itself after completing the task.
In modern Android development, IntentService is replaced with WorkManager or foreground services.
What is WorkManager and when should it be used? Medium
WorkManager is a Jetpack library used to schedule background tasks that need guaranteed execution, even if the app exits.
It is ideal for:
WorkManager automatically chooses the best background scheduling API depending on the Android version.
Explain the difference between LiveData and Flow. Hard
LiveData is lifecycle-aware and commonly used in MVVM architecture.
Flow (from Kotlin Coroutines) is more powerful and supports advanced operators like map, filter, and combine.
Flow is generally preferred in modern Android apps because it integrates better with coroutines and supports cold streams.
What is Data Binding in Android? Medium
Data Binding allows binding UI components directly to data sources in XML layouts.
This reduces boilerplate code and improves readability.
It works well with MVVM architecture and supports two-way data binding.
What is Jetpack Compose? Medium
Jetpack Compose is Androidβs modern UI toolkit that replaces XML layouts with declarative Kotlin code.
Instead of modifying views manually, you describe the UI state and Compose updates automatically.
It simplifies UI development and reduces boilerplate significantly.
What are Broadcast Receivers? Easy
Broadcast Receivers respond to system-wide broadcast messages like battery low, network changes, or boot completed.
They are lightweight components and should not perform heavy operations directly.
For long-running work, they should delegate tasks to WorkManager or Services.
How do you handle offline data in Android? Medium
Offline support is implemented using local storage solutions such as:
A common pattern is caching API responses locally and syncing when network becomes available.
Explain the Repository pattern in Android. Hard
The Repository pattern acts as a single source of truth for data.
It abstracts whether data comes from:
This keeps ViewModel clean and improves testability.
What is ProGuard and why is it used? Medium
ProGuard is a tool that shrinks, optimizes, and obfuscates code in Android apps.
It reduces APK size and protects intellectual property by renaming classes and methods.
It is configured inside proguard-rules.pro file.
How do you secure sensitive data in Android applications? Hard
To secure sensitive data:
Security is critical especially in fintech, healthcare, and enterprise apps.
Join our live classes with expert instructors and hands-on projects.
Enroll NowCustomized Corporate Training Programs and Developing Skills For Project Success.
Subscibe to our newsletter and we will notify you about the newest updates on Edugators