Android Development

Issue Tracker Android Updates Android Home Home Contact

Interview Q&A

General Android

What is Android? Android is an open-source operating system for mobile devices developed by Google, based on the Linux kernel. It supports a wide range of devices and is known for its flexibility and extensive app ecosystem.
What is an Activity in Android? An Activity represents a single screen with a user interface. It is one of the essential components of an Android app.
What is a Fragment? A Fragment is a reusable portion of an app's UI. It must be hosted within an Activity and helps create dynamic and flexible UIs on different screen sizes.
Difference between Activity and Fragment? Activity is a standalone screen while Fragment is a reusable component that needs to be hosted in an Activity. Fragments are preferred for modular and flexible UI design.
What is the AndroidManifest.xml file? It is the central configuration file for an Android app, declaring components, permissions, hardware features, and app metadata.
What are Intents in Android? Intents are messaging objects used to request actions from other app components (e.g., start an activity or send data).

User Interface & Components

What is the use of RecyclerView? RecyclerView efficiently displays large sets of data by recycling views. It supports layout managers, animations, and custom item views.
What is ViewModel in Android? ViewModel is a lifecycle-aware component that stores and manages UI-related data in a lifecycle-conscious way, ensuring data survives configuration changes.
What is LiveData? LiveData is a lifecycle-aware observable data holder class that updates the UI when the underlying data changes.
What is Jetpack Compose? Jetpack Compose is Android’s modern toolkit for building native UI using a declarative approach, replacing XML-based layouts.
Difference between ConstraintLayout and LinearLayout? ConstraintLayout allows complex positioning using constraints and reduces view hierarchy. LinearLayout arranges elements in a single row or column.

Storage & Networking

What is SharedPreferences? SharedPreferences is a key-value storage used to store small amounts of primitive data like user settings.
What is Room Database? Room is a SQLite abstraction library that provides compile-time checks, cleaner database access, and LiveData/Flow integration.
What is Retrofit? Retrofit is a type-safe HTTP client for Android and Java used to handle REST API calls, often integrated with Coroutines or RxJava.
What is Coroutines? Coroutines simplify asynchronous programming by allowing code to be suspended and resumed without blocking threads.

Testing & Dependency Injection

What is Robolectric? Robolectric is a unit testing framework that allows Android apps to be tested on the JVM without an emulator or device.
What is Mockito? Mockito is a popular mocking framework used to create and configure mock objects for testing Java/Kotlin classes.
What is Dagger/Hilt in Android? Dagger and Hilt are dependency injection frameworks that help manage and inject dependencies, improving testability and modularity.

App Lifecycle

What is the lifecycle of an Activity? An Activity goes through states like `onCreate()`, `onStart()`, `onResume()`, `onPause()`, `onStop()`, and `onDestroy()`. Each reflects a change in UI visibility or system interaction.
How is Fragment lifecycle different from Activity? Fragment lifecycle includes additional states like `onAttach()` and `onDetach()` and is closely tied to the hosting Activity's lifecycle.

Experience Summary

Summarize experience with Android development?