Back to Blog
Interview Q&A

Top 200 Android Development Interview Questions & Answers

Fortress Institute2026-04-0545 min read

Basic Questions (1-80)

Q1. What is Android?

Android is an open-source, Linux-based mobile operating system developed by Google. It is designed primarily for touchscreen mobile devices like smartphones and tablets and powers billions of devices worldwide across multiple hardware manufacturers.

Q2. What programming languages are used for Android development?

Android development primarily uses Java and Kotlin. Kotlin is now the officially preferred language by Google for Android development due to its conciseness, null safety, and interoperability with Java. C++ is also supported via the Android NDK for performance-critical native code.

Q3. What is an Activity in Android?

An Activity is a single screen with a user interface in an Android application. It represents one focused thing the user can do, such as viewing a list, composing an email, or taking a photo. Each activity has a lifecycle managed by the Android system.

Q4. What is the Activity lifecycle?

The Activity lifecycle consists of: onCreate(), onStart(), onResume(), onPause(), onStop(), onDestroy(), and onRestart(). These callbacks are called by the Android system as the activity transitions between foreground, background, and destroyed states.

Q5. What is a Fragment in Android?

A Fragment is a modular section of an Activity with its own lifecycle, layout, and behavior. Fragments allow building multi-pane UI layouts (for tablets) and reusing UI components across multiple activities. Multiple fragments can exist within a single activity simultaneously.

Q6. What is an Intent in Android?

An Intent is a messaging object used to request an action from another app component. Explicit Intents specify the target component (activity/service) directly. Implicit Intents declare a general action (open URL, share text) that any capable app component can handle.

Q7. What is AndroidManifest.xml?

AndroidManifest.xml is the essential configuration file for every Android app. It declares the app's package name, components (activities, services, receivers, providers), permissions, minimum SDK version, and hardware/software features required by the application.

Q8. What is the Android SDK?

The Android SDK (Software Development Kit) is a set of development tools, libraries, APIs, and documentation used to build, test, and debug Android applications. It includes the Android emulator, ADB (Android Debug Bridge), and platform-specific API libraries.

Q9. What is Gradle in Android development?

Gradle is the build system used in Android Studio for compiling, packaging, and deploying Android apps. The build.gradle files define app configuration: compileSdk, minSdk, targetSdk, dependencies, and build variants (debug/release), enabling flexible, reproducible builds.

Q10. What is Android Studio?

Android Studio is the official Integrated Development Environment (IDE) for Android development, built on JetBrains IntelliJ IDEA. It provides code editor, layout editor, emulator, Logcat, Profiler, APK Analyzer, and version control integration for the complete Android development workflow.

Q11. What is a Service in Android?

A Service is an application component that runs in the background without a user interface, performing long-running operations like music playback, network requests, or file downloads. Services can be Started (run indefinitely), Bound (client-server interface), or Foreground (with a notification).

Q12. What is a BroadcastReceiver in Android?

A BroadcastReceiver is a component that listens for and responds to system-wide broadcast announcements (e.g., battery low, connectivity changed, SMS received). Receivers can be registered statically in the manifest or dynamically at runtime in code.

Q13. What is a ContentProvider in Android?

A ContentProvider manages access to a structured set of data, providing a standard interface for sharing data between applications. It uses a URI addressing scheme to expose data (contacts, media, custom databases) to authorized querying apps via the ContentResolver.

Q14. What is an APK?

APK (Android Package Kit) is the file format used to distribute and install Android applications. An APK contains the compiled Dalvik bytecode (classes.dex), resources, assets, AndroidManifest.xml, and certificates, packaged as a ZIP archive with a .apk extension.

Q15. What is the difference between minSdkVersion and targetSdkVersion?

minSdkVersion specifies the lowest Android API level the app supports — older devices are excluded from the Play Store listing. targetSdkVersion specifies the API level the app is designed and tested for, enabling platform behavioral compatibility features for that version.

Q16. What is the View class in Android?

View is the fundamental building block of Android UI. All UI elements (TextView, Button, ImageView, EditText) extend the View class. Views have properties like layout parameters, visibility, padding, and draw themselves onto the screen within their allocated bounds.

Q17. What is a ViewGroup in Android?

A ViewGroup is an invisible View that contains and arranges other Views (or ViewGroups). Common ViewGroups include LinearLayout, RelativeLayout, ConstraintLayout, FrameLayout, and RecyclerView. They define the layout hierarchy of the screen.

Q18. What is ConstraintLayout?

ConstraintLayout is a flexible and performant ViewGroup that positions views using constraint relationships between them and the parent. It enables complex layouts without nesting multiple ViewGroups, improving rendering performance. It is the recommended layout for Android Studio's Layout Editor.

Q19. What is LinearLayout?

LinearLayout arranges child views in a single row (horizontal) or column (vertical) based on the android:orientation attribute. Weight (android:layout_weight) distributes available space proportionally among children. LinearLayout is simple but can degrade performance when deeply nested.

Q20. What is RelativeLayout?

RelativeLayout positions child views relative to each other or the parent container using attributes like android:layout_below, android:layout_toRightOf, and android:layout_centerInParent. It is largely superseded by ConstraintLayout but remains in legacy codebases.

Q21. What is RecyclerView in Android?

RecyclerView is a more advanced and efficient version of ListView for displaying large datasets by recycling off-screen item views. It requires a LayoutManager (LinearLayoutManager, GridLayoutManager) and an Adapter subclass to bind data to ViewHolders.

Q22. What is the ViewHolder pattern?

The ViewHolder pattern caches references to view components within a list item layout, avoiding repeated findViewById() calls during scrolling. RecyclerView enforces ViewHolder usage through its Adapter API, providing performant list rendering for large datasets.

Q23. What is an Adapter in Android?

An Adapter bridges data sources and view collections (RecyclerView, ListView, Spinner). It creates item views, binds data to them, and returns them to the parent view. RecyclerView.Adapter implements onCreateViewHolder(), onBindViewHolder(), and getItemCount().

Q24. What is SharedPreferences in Android?

SharedPreferences provides a mechanism for storing small amounts of primitive data (booleans, strings, ints, floats, longs) as key-value pairs in XML files on the device. It is used for persisting user preferences, settings, and app state across sessions.

Q25. What is SQLite in Android?

SQLite is a lightweight, embedded relational database engine included in Android. Android apps use SQLiteOpenHelper to create and manage SQLite databases for structured local data storage with full SQL query support for complex data relationships.

Q26. What is Room in Android?

Room is an Android Jetpack library providing an abstraction layer over SQLite, enabling database access with compile-time SQL validation, type safety, and LiveData/Flow integration. Room uses @Entity, @Dao, and @Database annotations to define the database schema and queries.

Q27. What is the Android Jetpack library suite?

Android Jetpack is a collection of libraries, tools, and guidance by Google to help developers write high-quality Android apps. Jetpack components include Room, ViewModel, LiveData, Navigation, WorkManager, Paging, DataStore, Compose, and many others.

Q28. What is ViewModel in Android?

ViewModel (Jetpack) is a lifecycle-aware class designed to store and manage UI-related data. ViewModel survives configuration changes (screen rotation), preventing data loss. It provides data to UI components (Activity/Fragment) via LiveData or StateFlow observables.

Q29. What is LiveData in Android?

LiveData is a lifecycle-aware observable data holder class in Jetpack. UI components observe LiveData, receiving updates only when they are in an active lifecycle state (STARTED or RESUMED). This prevents crashes from updates to stopped UI components and memory leaks.

Q30. What is the difference between LiveData and Flow?

LiveData is lifecycle-aware and designed for UI state observation with built-in lifecycle management. Flow (Kotlin Coroutines) is a cold, asynchronous data stream that supports backpressure, operators (map, filter, flatMap), and non-UI use cases. StateFlow and SharedFlow are hot flows used as LiveData alternatives.

Q31. What is the Navigation Component in Android Jetpack?

The Navigation Component (Jetpack) manages in-app navigation between destinations (fragments, activities, dialog fragments) using a visual navigation graph. NavController, NavHostFragment, and NavGraph define type-safe navigation with back stack management and argument passing.

Q32. What is Data Binding in Android?

Data Binding (Jetpack) enables binding UI components in layout XML files directly to data sources in the app's data model. Two-way data binding synchronizes UI and data model bidirectionally, reducing boilerplate findViewById() calls and manual UI update code.

Q33. What is View Binding in Android?

View Binding generates a binding class for each XML layout, containing direct references to all views with an ID. Unlike Data Binding, it is simpler (no layout tags required), type-safe, and null-safe, replacing findViewById() calls for safe, efficient view access.

Q34. What is Retrofit in Android?

Retrofit is a type-safe HTTP client library for Android (by Square) that converts REST APIs into Kotlin/Java interfaces. Annotations (@GET, @POST, @Path, @Query, @Body) define API endpoints; Retrofit handles request construction, response parsing (Gson, Moshi), and error handling.

Q35. What is OkHttp in Android?

OkHttp is an efficient HTTP client by Square, used as Retrofit's underlying HTTP engine. It supports HTTP/2, connection pooling, GZIP compression, and interceptors (for logging, authentication headers, caching). OkHttp handles low-level network communication efficiently.

Q36. What is Glide in Android?

Glide is a fast image loading and caching library for Android. It loads images from URLs, files, or resources into ImageViews efficiently with disk and memory caching, placeholder support, transformations (circle crop, rounded corners), and GIF/WebP support.

Q37. What is Picasso in Android?

Picasso (by Square) is an image loading library for Android that simplifies loading images from URLs with automatic memory and disk caching, transformations, and error handling. Similar to Glide but with a simpler API; Glide is more feature-rich and performant for complex use cases.

Q38. What are Kotlin Coroutines in Android?

Kotlin Coroutines are a concurrency framework for asynchronous programming. They provide suspend functions that can pause execution without blocking the thread, enabling sequential asynchronous code without callbacks. Coroutines are the standard for Android async operations replacing AsyncTask and RxJava callbacks.

Q39. What is a Coroutine Scope in Android?

CoroutineScope defines the lifetime of coroutines launched within it. viewModelScope (tied to ViewModel lifecycle), lifecycleScope (tied to Activity/Fragment lifecycle), and GlobalScope (app-wide) are common scopes. When the scope is cancelled, all coroutines within it are cancelled.

Q40. What is Dispatchers in Kotlin Coroutines?

Dispatchers determine which thread(s) coroutines run on. Dispatchers.Main runs on the Android main/UI thread for UI updates. Dispatchers.IO is optimized for disk and network I/O operations. Dispatchers.Default is for CPU-intensive computation. withContext() switches dispatchers within a coroutine.

Q41. What is Hilt in Android?

Hilt (Jetpack) is a dependency injection framework for Android built on top of Dagger 2. It simplifies Dagger setup by providing standardized Android-specific components and scopes (@HiltAndroidApp, @AndroidEntryPoint, @Singleton, @ViewModelScoped) with reduced boilerplate code.

Q42. What is Dependency Injection?

Dependency Injection (DI) is a design pattern where a class receives its dependencies from external sources rather than creating them internally. DI improves testability (mocking dependencies), modularity, and separation of concerns. Android supports DI via Hilt, Dagger, or Koin.

Q43. What is WorkManager in Android?

WorkManager (Jetpack) is the recommended API for deferrable, guaranteed background work that must run even if the app exits or the device restarts (e.g., syncing data, uploading logs). It chooses the best underlying implementation (JobScheduler, AlarmManager, BroadcastReceiver) based on API level.

Q44. What is a Notification in Android?

Notifications are messages displayed outside the app's UI in the status bar, notification shade, or lock screen. NotificationCompat.Builder creates notifications with title, content text, icon, actions, and priority. From Android 8.0+, notifications require a NotificationChannel.

Q45. What is a NotificationChannel?

NotificationChannel (API 26+) groups notifications by category, allowing users to control notification behavior (sound, vibration, importance) per channel in the system settings. Apps must create channels at startup and specify a channel ID when posting notifications.

Q46. What are Permissions in Android?

Android permissions control access to sensitive resources and features (camera, location, contacts, microphone). Dangerous permissions (location, camera) require runtime permission requests (requestPermissions()) from Android 6.0+. Normal permissions are auto-granted at install.

Q47. What is the difference between explicit and implicit Intents?

Explicit Intents specify the exact component to start by class name (e.g., Intent(this, DetailActivity::class.java)). Implicit Intents specify only an action/category/data (e.g., ACTION_VIEW with a URL), letting the system find a matching component from any installed app.

Q48. What is Intent Filter in Android?

An Intent Filter declared in AndroidManifest.xml specifies the types of implicit Intents a component can respond to. It defines action (ACTION_VIEW), category (CATEGORY_DEFAULT), and data (scheme, mimeType) criteria used by the system to resolve implicit Intent destinations.

Q49. What is the Back Stack in Android?

The Back Stack (Task Back Stack) is a last-in, first-out stack of Activity instances. Starting a new Activity pushes it onto the stack; pressing Back pops it. The Navigation Component manages Fragment back stacks through the NavBackStackEntry mechanism.

Q50. What is onSaveInstanceState() in Android?

onSaveInstanceState(Bundle) is called before an Activity is destroyed (on rotation or process death), allowing it to save transient UI state. The Bundle is passed back in onCreate() and onRestoreInstanceState(), enabling UI state restoration after recreation.

Q51. What is the difference between onCreate() and onStart()?

onCreate() is called once when the Activity is first created — for one-time initialization (inflate layout, set up ViewModel, configure RecyclerView). onStart() is called each time the Activity becomes visible, including after returning from another Activity or emerging from the background.

Q52. What is the Application class in Android?

The Application class is the base class for maintaining global application state. It is instantiated before any Activity, Service, or BroadcastReceiver. Used for initializing libraries (Hilt, Firebase, Timber), singletons, and global configurations at app startup.

Q53. What is Context in Android?

Context is an abstract class providing access to application-specific resources, system services, and operations (launching Activities, registering broadcast receivers, accessing files). Activity Context is tied to the Activity lifecycle; Application Context persists for the app's lifetime.

Q54. What is the difference between Application Context and Activity Context?

Application Context is a long-lived context (app lifetime) safe for singletons and library initialization. Activity Context is short-lived (Activity lifetime) and required for UI operations (inflating layouts, showing dialogs). Using Activity Context in long-lived objects causes memory leaks.

Q55. What is dp (density-independent pixels)?

dp (or dip) is a virtual pixel unit that scales with screen density, ensuring UI elements appear the same physical size across different screen densities. 1dp equals 1px on a 160 dpi (mdpi) screen. Android translates dp to px using: px = dp * (dpi/160).

Q56. What is sp (scale-independent pixels)?

sp is a unit for font sizes that scales with both screen density and the user's font size preference (Accessibility > Font Size). Using sp for text sizes ensures readability for users who set larger system font sizes. All text should use sp units.

Q57. What are the Android screen density buckets?

Android defines density qualifiers: ldpi (120dpi), mdpi (160dpi), hdpi (240dpi), xhdpi (320dpi), xxhdpi (480dpi), xxxhdpi (640dpi). Drawable resources are placed in corresponding folders (res/drawable-hdpi) for the system to load the best-matching density resource.

Q58. What is vector drawable in Android?

Vector drawables (VectorDrawable) are scalable vector graphics defined in XML. They maintain sharpness at any display density without requiring multiple resolution-specific PNG assets. Android Studio supports converting SVG files to VectorDrawable XML format.

Q59. What is a 9-patch image in Android?

A 9-patch (NinePatchDrawable) is a stretchable bitmap image with defined stretch zones (via black border markers on 1px edges). Android stretches 9-patches in the defined zones while keeping corners and edges fixed, used for button backgrounds and dialog frames.

Q60. What is the res directory structure in Android?

The res/ directory contains: drawable/ (images), layout/ (XML layouts), values/ (strings.xml, colors.xml, dimens.xml, themes.xml), mipmap/ (launcher icons), menu/ (menu XMLs), anim/ (animations), raw/ (raw files), and xml/ (preference XMLs and file provider paths).

Q61. What is strings.xml in Android?

strings.xml (res/values/strings.xml) stores all user-visible text strings as named resources. Externalizing strings enables app localization (translation to multiple languages) by providing language-specific strings.xml files in res/values-{lang}/ directories.

Q62. What is the colors.xml file in Android?

colors.xml (res/values/colors.xml) defines named color resources referenced by @color/colorName in layouts and code. Centralizing colors enables global color changes by editing one file, and supports Material Design 3 theming with dynamic color generation.

Q63. What is the styles.xml/themes.xml in Android?

themes.xml defines the app's visual theme (extending Theme.Material3.DayNight or Theme.AppCompat) with attribute overrides for primary/secondary colors, typography, shape, and component-level style customization. Applied in AndroidManifest to the application or specific activities.

Q64. What is Material Design in Android?

Material Design is Google's design system for Android and web applications, providing guidelines for visual design (color, typography, shape, elevation), component behavior (ripple effects, transitions), and interaction patterns. The Material Components library (MDC-Android) implements Material Design in Android apps.

Q65. What is the AppCompatActivity?

AppCompatActivity is a base Activity class from the AndroidX AppCompat library that provides backward compatibility for Material Design components (Toolbar, ActionBar, themes) on older Android versions. Most activities extend AppCompatActivity instead of the base Activity class.

Q66. What is the Toolbar in Android?

Toolbar (MaterialToolbar) is a customizable app bar widget replacing the traditional ActionBar. It is a regular View that can be placed anywhere in the layout, styled with custom colors, menus, navigation icons, and titles, and set as the ActionBar via setSupportActionBar().

Q67. What is the Bottom Navigation Bar?

BottomNavigationView provides a Material Design bottom navigation bar with up to 5 top-level destinations. Navigation Component integrates with BottomNavigationView via NavigationUI.setupWithNavController() to handle fragment navigation and back stack on item selection.

Q68. What is a Toast in Android?

A Toast is a brief popup message displayed at the bottom of the screen (or custom position) that disappears automatically after a short (LENGTH_SHORT) or long (LENGTH_LONG) duration. Used for non-critical feedback. For longer messages, Snackbar is preferred.

Q69. What is a Snackbar in Android?

A Snackbar is a Material Design component that displays a brief message at the bottom of the screen with an optional action button (e.g., UNDO). Unlike Toast, Snackbar is anchored to a CoordinatorLayout, supports swipe-to-dismiss, and interaction via action callbacks.

Q70. What is a Dialog in Android?

A Dialog is a small window prompting user input or displaying information before proceeding. AlertDialog.Builder creates common dialogs (confirm/cancel, single-choice, multi-choice). DialogFragment encapsulates dialogs in a Fragment, ensuring proper lifecycle management.

Q71. What is a ProgressBar in Android?

ProgressBar is a UI element indicating loading or ongoing operation. Determinate ProgressBar shows completion percentage (0-100); indeterminate ProgressBar animates continuously when the completion time is unknown. CircularProgressIndicator (MDC) is the Material Design variant.

Q72. What is the difference between match_parent and wrap_content?

match_parent makes the view expand to fill all available space in its parent dimension. wrap_content makes the view resize to fit only its content. These are assigned to android:layout_width and android:layout_height attributes in XML layouts.

Q73. What is padding vs margin in Android layouts?

Padding adds space inside a view between its content and its edges (android:padding). Margin (android:layout_margin) adds space outside the view, between it and adjacent views or the parent. Both can be specified for each side independently (paddingStart, marginTop, etc.).

Q74. What is ADB (Android Debug Bridge)?

ADB is a command-line tool enabling communication between a development machine and an Android device/emulator. ADB commands include: adb install (install APK), adb logcat (view logs), adb shell (device shell), adb push/pull (file transfer), and adb devices (list connected devices).

Q75. What is Logcat in Android?

Logcat is the Android logging system that outputs system messages and app logs in real time. Log.d() (Debug), Log.i() (Info), Log.w() (Warn), Log.e() (Error), and Log.v() (Verbose) write tagged messages to Logcat, visible in Android Studio's Logcat panel for debugging.

Q76. What is the Android Emulator?

The Android Emulator (AVD - Android Virtual Device) simulates Android hardware and software on the development machine. AVDs are configured with specific device profiles, Android API versions, RAM, screen size, and hardware features for testing without physical devices.

Q77. What is the difference between a foreground Service and a background Service?

A Foreground Service performs operations immediately visible to the user with a persistent notification (music player, navigation). A background Service performs work without a notification, but is heavily restricted in Android 8.0+ to preserve battery life and system resources.

Q78. What is Firebase in Android development?

Firebase is Google's mobile backend platform providing services for Android apps: Firestore (NoSQL database), Authentication, Cloud Storage, Cloud Messaging (FCM push notifications), Crashlytics, Analytics, Remote Config, and App Distribution for testing builds.

Q79. What is FCM (Firebase Cloud Messaging)?

FCM is Firebase's cross-platform messaging solution for sending push notifications and data messages to Android devices. FCM delivers messages via Google's infrastructure reliably. Apps implement FirebaseMessagingService to receive messages and display notifications.

Q80. What is the Google Play Store?

The Google Play Store is Google's digital distribution platform for Android apps. Apps are published by uploading a signed AAB (Android App Bundle), defining store listing metadata, screenshots, and content rating. The Play Console provides release management, analytics, and crash reporting.

Intermediate Questions (81-150)

Q81. What is the MVVM architecture pattern in Android?

MVVM (Model-View-ViewModel) separates the UI (View: Activity/Fragment) from business logic (ViewModel) and data (Model: Repository/Room). The View observes ViewModel's LiveData/StateFlow, reacting to data changes. ViewModel survives configuration changes, preventing data loss on rotation.

Q82. What is the Repository pattern in Android?

The Repository pattern abstracts data sources (local Room database, remote API) behind a unified interface. The ViewModel requests data from the Repository without knowing its source. This decoupling enables easy swapping of data sources and unit testing with mock repositories.

Q83. What is Clean Architecture in Android?

Clean Architecture (by Robert Martin) separates code into layers: Presentation (UI, ViewModel), Domain (UseCases, business logic, pure Kotlin), and Data (Repositories, API, Database). Dependency direction flows inward — outer layers depend on inner layers, never the reverse.

Q84. What is a UseCase in Clean Architecture?

A UseCase (Interactor) encapsulates a single business operation (GetUserUseCase, LoginUseCase). It sits in the Domain layer, independent of Android framework. The ViewModel calls UseCases; UseCases call Repository interfaces. This isolation makes business logic independently testable.

Q85. What is Dagger 2 in Android?

Dagger 2 is a compile-time dependency injection framework for Android/Java. It generates DI code at compile time (no reflection), providing zero-overhead injection. Components, Modules, and @Provides annotations define the dependency graph. Hilt is built on top of Dagger 2 for Android simplicity.

Q86. What is Koin in Android?

Koin is a lightweight, Kotlin-idiomatic dependency injection framework using DSL syntax (module { single { } factory { } viewModel { } }) without code generation. It is simpler than Dagger/Hilt for small-to-medium apps but has runtime resolution overhead compared to compile-time DI.

Q87. What are Kotlin Data Classes?

Data classes (data class User(val name: String, val age: Int)) automatically generate equals(), hashCode(), toString(), copy(), and componentN() functions based on the constructor properties. Data classes are ideal for model objects (API responses, database entities, UI state).

Q88. What are Kotlin Sealed Classes?

Sealed classes restrict the class hierarchy to a predefined set of subclasses defined in the same file. They are used for representing restricted state hierarchies (Result.Success, Result.Error, Result.Loading) where exhaustive when expressions ensure all states are handled in UI.

Q89. What is StateFlow in Kotlin?

StateFlow is a hot Flow that holds and emits the current state value. It replaces LiveData in modern Android development with Kotlin Coroutines. StateFlow.value reads the current value synchronously; Fragments collect it in a lifecycleScope coroutine respecting lifecycle.

Q90. What is SharedFlow in Kotlin?

SharedFlow is a hot Flow that emits values to multiple collectors simultaneously. Unlike StateFlow, it doesn't have a persistent state and supports replay (replayCaching last N emissions). Used for one-shot events (navigation, Snackbar messages) where LiveData's single-event handling was problematic.

Q91. What is the Paging 3 library in Jetpack?

Paging 3 (Jetpack) handles paginated data loading from local (Room), remote (API), or both (RemoteMediator) sources. PagingSource defines data loading logic; PagingData is collected in the UI via PagingDataAdapter (RecyclerView adapter) supporting load state indicators and retry.

Q92. What is DataStore in Android Jetpack?

DataStore (Jetpack) is a modern replacement for SharedPreferences, providing asynchronous, consistent, and transactional data storage. Preferences DataStore stores key-value pairs; Proto DataStore stores typed objects with Protocol Buffers. Both use Kotlin Flow for async reads.

Q93. What is the difference between DataStore and SharedPreferences?

SharedPreferences uses synchronous I/O on the main thread (causing ANR risk) and doesn't handle concurrent modifications safely. DataStore uses Kotlin Flow for async reads, Coroutines for writes, and provides consistent reads-after-writes guarantees, making it the recommended preference storage replacement.

Q94. What is Jetpack Compose?

Jetpack Compose is Android's modern declarative UI toolkit, replacing XML layouts. Composable functions annotated with @Composable describe the UI as a function of state. Compose automatically recomposes (re-renders) only the parts of the UI affected by state changes, improving performance and developer experience.

Q95. What are Composable functions in Jetpack Compose?

Composable functions (annotated @Composable) are the building blocks of Compose UI. They can emit UI elements, call other Composables, and react to state changes. Composables must only be called from other Composables and follow the Compose programming model for recomposition and side effects.

Q96. What is State in Jetpack Compose?

State in Compose is data that can change over time and triggers UI recomposition when modified. remember{} keeps state across recompositions. mutableStateOf() creates observable state. rememberSaveable preserves state across configuration changes and process death.

Q97. What is Recomposition in Jetpack Compose?

Recomposition is the process of Compose calling Composable functions again when their input state changes to update the UI. Compose intelligently skips recomposing functions whose inputs haven't changed (smart recomposition), making Compose UIs performant with minimal unnecessary work.

Q98. What is LazyColumn in Jetpack Compose?

LazyColumn is the Compose equivalent of RecyclerView for vertical lists. It only composes and lays out visible items, providing efficient rendering of large datasets. items() and itemsIndexed() DSL functions define list content with keys for stable item identification.

Q99. What is the remember function in Compose?

remember{} caches a computation's result across recompositions, recalculating only when the keys change. Without remember, the computation runs on every recomposition. rememberSaveable{} additionally persists remembered values across Activity recreation and process death.

Q100. What is Modifier in Jetpack Compose?

Modifier is a Compose element that decorates or configures a Composable's layout, drawing, and behavior. Modifiers chain in order: Modifier.fillMaxWidth().padding(16.dp).background(Color.Blue).clickable{}. The ordering of modifiers matters — padding before background vs after produces different results.

Q101. What is the ProGuard/R8 in Android?

ProGuard/R8 is the Android code shrinker, obfuscator, and optimizer. R8 (the default since Android Gradle Plugin 3.4) combines shrinking (removing unused classes/methods), optimization (inlining, constant folding), and obfuscation (renaming) to reduce APK size and protect code.

Q102. What is the Android App Bundle (AAB)?

AAB (Android App Bundle) is the recommended publishing format for Google Play. Unlike a monolithic APK, AAB includes all compiled code and resources; Play generates optimized APKs (splits) for each device's screen density, ABI, and language — reducing installed app size by ~15-20%.

Q103. What are build variants in Android Gradle?

Build variants are combinations of Build Types (debug, release) and Product Flavors (free, paid; dev, staging, production). Each variant generates its own APK/AAB with different configurations: package names, API endpoints, feature flags, and signing configurations.

Q104. What are Product Flavors in Android?

Product Flavors define dimension-based app variations (e.g., flavorDimensions: "tier" with flavors "free" and "premium", dimension: "env" with "dev" and "prod"). Each flavor can override resources, code, and manifest entries to create multiple distinct app variants from one codebase.

Q105. What is the Android NDK?

The Android NDK (Native Development Kit) allows implementing parts of Android apps in C/C++. Used for performance-critical code (game engines, signal processing, codecs), accessing hardware directly, or reusing existing C/C++ libraries. JNI (Java Native Interface) bridges Java/Kotlin and C/C++.

Q106. What is the difference between AsyncTask and Coroutines?

AsyncTask is deprecated (Android 11+) due to memory leaks, coupling to Activity lifecycle, and error-prone cancellation. Kotlin Coroutines (viewModelScope, lifecycleScope) are the modern replacement — lifecycle-aware, cancellable, composable with suspend functions, and integrated with Jetpack APIs.

Q107. What is RxJava in Android?

RxJava is a reactive programming library for Android using Observable sequences for async and event-driven programming. Operators (map, flatMap, filter, zip, debounce) compose complex async workflows. While still used in legacy code, Kotlin Coroutines and Flow are the modern replacement for new Android projects.

Q108. What is memory leak in Android and how to prevent it?

Memory leaks occur when objects are retained in memory beyond their useful lifetime (e.g., Activity held by a long-lived singleton). Prevention: use Application Context for long-lived references, cancel coroutines in lifecycle callbacks, clear references in onDestroy(), and use LeakCanary for detection.

Q109. What is LeakCanary?

LeakCanary (by Square) is a memory leak detection library for Android. It automatically detects Activity, Fragment, ViewModel, and View memory leaks at runtime in debug builds, dumping a heap snapshot and identifying the reference chain causing the leak for developer diagnosis.

Q110. What is ANR (Application Not Responding) in Android?

ANR is an error dialog shown when an app's main/UI thread is blocked for more than 5 seconds (user input) or 10 seconds (BroadcastReceiver). ANRs are caused by performing network, disk I/O, or heavy computation on the main thread. All such operations must be offloaded to background threads or coroutines.

Q111. What is the Android Profiler in Android Studio?

Android Profiler provides real-time monitoring of CPU, Memory, Network, and Energy usage in running apps. CPU Profiler records method traces for identifying hotspots; Memory Profiler tracks allocations and heap dumps; Network Profiler inspects HTTP traffic; Energy Profiler identifies battery drain sources.

Q112. What is the difference between Parcelable and Serializable in Android?

Parcelable is Android's custom serialization mechanism for passing objects between Activities/Fragments via Intents and Bundles. It is 10x faster than Java Serializable because it avoids reflection. @Parcelize (Kotlin plugin) auto-generates Parcelable implementation from data class properties.

Q113. What is the Navigation Safe Args plugin?

Safe Args (Navigation Jetpack plugin) generates type-safe Kotlin classes for passing arguments between Navigation graph destinations. It prevents runtime crashes from missing or incorrectly typed arguments by generating Direction and Args classes with compile-time argument validation.

Q114. What is Deep Linking in Android?

Deep Links are URLs (http://, app-specific schemes) that navigate users directly to a specific screen within an Android app. Navigation Component supports deep links via <deepLink> elements in the nav graph, enabling link handling from web, notifications, and other apps.

Q115. What is App Links in Android?

App Links (Android 6.0+) are HTTP/HTTPS deep links verified against the app's associated domain (Digital Asset Links JSON file on the website). Verified App Links open directly in the app without the disambiguation dialog, providing a seamless web-to-app navigation experience.

Q116. What is the difference between Bundle and Intent extras?

Intent extras are key-value pairs attached to an Intent (intent.putExtra(), intent.getStringExtra()). Bundle is a general-purpose key-value map passed in Intent.putExtras(), onSaveInstanceState(), and Fragment arguments. Both use the same underlying Parcel mechanism for data transport.

Q117. What is the Fragment Back Stack?

The Fragment Back Stack is managed by the FragmentManager (addToBackStack()) for traditional Fragment transactions. With Navigation Component, the NavBackStack is managed automatically. Pressing Back pops the most recently added Fragment destination from the stack.

Q118. What is the purpose of the lifecycle library in Jetpack?

The Lifecycle library provides LifecycleOwner (Activity/Fragment) and LifecycleObserver interfaces for lifecycle-aware components. Classes implementing LifecycleObserver receive lifecycle callbacks via @OnLifecycleEvent annotations, enabling components to self-manage their lifecycle without overriding Activity methods.

Q119. What is the difference between launch and async in Kotlin Coroutines?

launch starts a coroutine that doesn't return a result — it returns a Job for cancellation. async starts a coroutine that returns a Deferred<T>; the result is retrieved via await(). Use launch for fire-and-forget operations; async for concurrent operations where the result is needed.

Q120. What is structured concurrency in Kotlin Coroutines?

Structured Concurrency ensures coroutines are launched in a specific CoroutineScope. Child coroutines are automatically cancelled when the parent scope is cancelled. This prevents coroutine leaks — ensuring all launched coroutines are tracked and cleaned up with the owning lifecycle.

Q121. What is the purpose of flow operators in Kotlin?

Flow operators transform emitted values: map{} transforms each emission, filter{} selects emissions matching a predicate, flatMapLatest{} switches to a new flow on each emission cancelling the previous, combine{} merges multiple flows, and debounce{} delays emissions for search-as-you-type patterns.

Q122. What is the MutableStateFlow vs MutableLiveData comparison?

Both hold observable state values. MutableStateFlow is part of Kotlin Coroutines (non-Android), supports initial value required, and is collected using coroutines. MutableLiveData is Android-specific, lifecycle-aware by default, and easier to use without coroutines. Modern projects prefer StateFlow + collectAsStateWithLifecycle().

Q123. What is the Android Keystore system?

The Android Keystore system stores cryptographic keys securely in a hardware-backed keystore (TEE or StrongBox). Keys generated in Keystore never leave the secure hardware, preventing extraction. Used for symmetric (AES) and asymmetric (RSA/EC) encryption, HMAC signing, and biometric authentication.

Q124. What is BiometricPrompt in Android?

BiometricPrompt (Jetpack) provides a standard UI and API for biometric authentication (fingerprint, face, iris) with fallback to device PIN/pattern/password. It abstracts device-specific biometric hardware and integrates with the Android Keystore for authenticated cryptographic operations.

Q125. What is Encrypted SharedPreferences?

EncryptedSharedPreferences (Jetpack Security Crypto) wraps SharedPreferences with AES-256 encryption for both keys and values, using keys stored in Android Keystore. Used for securely storing session tokens, API keys, and sensitive user data in local preference storage.

Q126. What is the Android Architecture Components overview?

Android Architecture Components (now part of Jetpack) include: ViewModel (lifecycle-aware state), LiveData (observable data holder), Room (SQLite abstraction), Navigation (in-app navigation), Paging (paginated lists), WorkManager (background work), and DataStore (data storage). Together they implement the recommended MVVM architecture.

Q127. What is the use of @Entity annotation in Room?

@Entity marks a Kotlin data class as a Room database table. Each property maps to a table column. @PrimaryKey specifies the primary key column (autoGenerate = true for auto-increment). @ColumnInfo renames columns; @Ignore excludes fields from the table schema.

Q128. What is the @Dao annotation in Room?

@Dao marks an interface as a Room Data Access Object. DAO methods are annotated with @Query (SQL), @Insert, @Update, @Delete, or @Upsert. Room generates the implementation at compile time. DAOs return LiveData, Flow, or suspend functions for reactive and async database access.

Q129. What is a Room Migration?

Room Migrations handle database schema changes between app versions without data loss. A Migration(oldVersion, newVersion) object provides the ALTER TABLE or other SQL to upgrade the schema. Migrations are added to the Room database builder via addMigrations().

Q130. What is the TypeConverter in Room?

TypeConverters allow Room to store non-primitive types (Date, List, custom objects) by providing @TypeConverter methods that convert between the custom type and a Room-supported primitive (String, Long, Int). Converters are registered with @TypeConverters annotation on the Database class.

Q131. What is the difference between cold and hot flows?

Cold flows (Flow builder) start emitting values only when collected — each collector gets its own independent stream. Hot flows (StateFlow, SharedFlow) emit values regardless of collectors and share emissions among multiple collectors. Cold flows are better for one-shot operations; hot flows for shared state.

Q132. What is the purpose of the collectAsStateWithLifecycle() in Compose?

collectAsStateWithLifecycle() (Lifecycle-Runtime-Compose) collects a Flow as Compose State while respecting the lifecycle — stopping collection when the Composable is not visible (STARTED or lower). This prevents unnecessary collection in the background, saving resources compared to collectAsState().

Q133. What is the difference between remember and rememberSaveable?

remember{} preserves state across recompositions but loses state on Activity/Fragment recreation. rememberSaveable{} additionally saves state to Bundle (onSaveInstanceState mechanism), preserving it across configuration changes and process death/restoration — like ViewModel's saved state handle.

Q134. What is Compose Navigation?

Compose Navigation uses NavHost, NavController, and composable() destinations to define navigation graphs in Kotlin code instead of XML. Type-safe navigation is achieved with the Navigation 2.8+ typed destinations using @Serializable data classes for route definitions.

Q135. What are side effects in Jetpack Compose?

Side effects in Compose are effects that escape the Composable's scope: LaunchedEffect (launches a coroutine tied to a key), DisposableEffect (runs cleanup on disposal/key change), SideEffect (synchronizes non-Compose state), and rememberCoroutineScope (launches manual coroutines from callbacks).

Q136. What is the purpose of the Android Lint tool?

Android Lint is a static code analysis tool integrated in Android Studio that inspects source code, XML, and Gradle files for potential bugs, performance issues, security vulnerabilities, accessibility problems, and code style violations — providing warnings and quickfix suggestions.

Q137. What is unit testing in Android?

Unit tests test individual classes/functions in isolation on the JVM (local tests in test/) without Android framework dependencies. JUnit 4/5, Mockk (Kotlin mocking), and Turbine (Flow testing) are common frameworks. ViewModels, UseCases, and Repository logic are ideal unit test targets.

Q138. What is instrumentation testing in Android?

Instrumentation tests (androidTest/) run on a physical device or emulator with Android framework access. Espresso tests UI interactions (button clicks, text entry, RecyclerView scrolling); UI Automator tests cross-app flows; and Compose Testing APIs test Compose UIs with semantic node selectors.

Q139. What is Espresso in Android testing?

Espresso is the official UI testing framework for Android. It synchronizes test actions with the app's UI thread, preventing flaky tests. onView(withId(R.id.button)).perform(click()).check(matches(isDisplayed())) is the typical Espresso interaction-assertion pattern for UI testing.

Q140. What is Mockk in Android testing?

Mockk is a Kotlin-idiomatic mocking library for unit tests. mockk<ClassName>() creates mocks; every { mock.method() } returns value defines behavior; verify { mock.method() } asserts calls. Mockk supports coroutine suspension mocking with coEvery{}/coVerify{} for async function testing.

Q141. What is the purpose of the android:exported attribute?

android:exported declares whether an Activity, Service, or BroadcastReceiver can be launched by external apps. From Android 12+, components with IntentFilters must explicitly set android:exported to true or false. Setting exported=false restricts access to within the same app package.

Q142. What is Content Security and FileProvider?

FileProvider (ContentProvider subclass) exposes files from the app's private storage to other apps via secure content:// URIs instead of direct file:// URIs (blocked on Android 7+ by StrictMode). Used for sharing images captured by the camera app back to the calling app.

Q143. What is App Startup library in Jetpack?

App Startup (Jetpack) provides an efficient way to initialize libraries at app launch using Initializer interfaces, replacing multiple ContentProvider-based initializations with a single InitializationProvider, reducing app startup time by consolidating initialization logic.

Q144. What is the purpose of the Baseline Profile in Android?

Baseline Profiles (Jetpack) pre-compile a subset of the app's code paths (startup, critical journeys) from Dalvik bytecode to machine code using AOT compilation, reducing JIT compilation overhead. This improves app startup time by up to 40% and reduces frame rendering jank.

Q145. What is the Startup trace in app performance?

App startup time is measured from process start to first rendered frame. Cold start (new process), Warm start (process exists, Activity recreated), and Hot start (Activity onRestart()) have different performance characteristics. Jetpack Macrobenchmark measures startup time precisely in CI pipelines.

Q146. What is the purpose of the SplashScreen API in Android 12+?

The SplashScreen API (Android 12+) standardizes the launch splash screen: app icon displayed centered on windowBackground, with optional icon animation. The AndroidX SplashScreen library backports this behavior to Android 6+, replacing custom splash screen Activities.

Q147. What is the purpose of Accompanist libraries?

Accompanist (by Google) provides experimental and supplemental Compose libraries: permissions handling, system UI controller, placeholder/shimmer, pager (now in Compose Foundation), and adaptive layouts. Features graduate to official Compose libraries as they stabilize.

Q148. What is the purpose of the Coil library in Android?

Coil (Coroutine Image Loader) is a Kotlin-first image loading library using Coroutines for async loading. It supports GIF, SVG, video frames, and provides a Compose integration (AsyncImage Composable) as a modern alternative to Glide and Picasso for Compose-based apps.

Q149. What is the Moshi library?

Moshi (by Square) is a JSON parsing library for Kotlin/Java. It uses code generation (kapt/KSP adapters) or reflection for JSON deserialization. Moshi handles Kotlin nullable types and default values correctly — making it a better fit than Gson for Kotlin-first Android projects.

Q150. What is KSP (Kotlin Symbol Processing)?

KSP is a Kotlin-first annotation processing API replacing KAPT (Kotlin Annotation Processing Tool). KSP is 2x faster than KAPT for code generation (Room, Hilt, Moshi, Retrofit adapters) by operating on Kotlin's IR directly without generating Java stubs first.

Advanced Questions (151-200)

Q151. What is the Android rendering pipeline?

Android's rendering pipeline: CPU-side: app code executes, View hierarchy traversal (measure, layout, draw), Display List recorded. GPU-side: RenderThread replays Display List commands via OpenGL ES or Vulkan to the GPU. Hardware Composer (HWC) composites layers to the display at vsync intervals.

Q152. What is Jank in Android and how to measure it?

Jank (dropped frames) occurs when a frame takes longer than 16ms (60fps) or 8.3ms (120Hz) to render, causing visible stutter. Systrace, Android Profiler CPU traces, and Jetpack Macrobenchmark measure frame times and identify slow draw, layout, or overdraw sources.

Q153. What is Overdraw in Android and how to reduce it?

Overdraw is drawing pixels multiple times in a single frame (background → card background → text) wasting GPU cycles. Debug Overdraw (Developer Options > Debug GPU Overdraw) visualizes it with color overlays. Reduce overdraw by removing redundant backgrounds and using transparent themes where appropriate.

Q154. What is the purpose of the Macrobenchmark library?

Jetpack Macrobenchmark measures real device performance for startup time, scrolling performance, and custom journeys. It instruments the app process via UI Automator, reports timing metrics (timeToInitialDisplay, frameStats), and integrates with CI for regression detection across code changes.

Q155. What is the purpose of the Microbenchmark library?

Jetpack Microbenchmark measures the performance of code functions (sorting algorithms, database queries, JSON parsing) on device hardware using precise timing with warm-up iterations to account for JIT compilation. Results in nanoseconds/microseconds with statistical rigor (median, min, max).

Q156. What is Multi-Module Android architecture?

Multi-module architecture splits an Android app into Gradle modules by feature (feature:login, feature:home) and layer (core:network, core:database, core:ui). Benefits: parallel compilation, faster build times, stronger encapsulation (internal visibility), and independent module testing.

Q157. What is the purpose of the :app module in multi-module Android?

The :app module is the application module that depends on all feature modules, assembles the final APK/AAB, and contains the Application class and main manifest. It is the root module at the top of the dependency graph, composed from feature and core modules below it.

Q158. What is a dynamic feature module in Android?

Dynamic Feature Modules (Play Feature Delivery) are optional app modules installed on-demand after initial install, reducing initial APK size. Features like AR experiences or advanced editing tools are delivered via SplitInstallManager API only to users who need them.

Q159. What is the purpose of the Android Gradle Plugin (AGP)?

AGP is the Gradle plugin that builds Android apps. It provides Android-specific build tasks (merging manifests, processing resources, AAPT2, D8/R8 compilation, signing, and packaging). AGP version determines supported features and minSdk/compileSdk constraints.

Q160. What is the D8 compiler in Android?

D8 is the Android dexer that compiles Java bytecode (.class files) to Dalvik bytecode (.dex files). D8 replaced the legacy DX compiler in Android Gradle Plugin 3.1+, providing better desugaring (Java 8+ language features on older APIs), smaller .dex files, and faster compilation.

Q161. What is code desugaring in Android?

Desugaring allows using Java 8+ language features (lambdas, streams, java.time API) on older Android API levels (below 26). D8/R8 replaces these constructs with equivalent bytecode that runs on older Dalvik VMs, enabling modern Java API usage with minSdkVersion < 26.

Q162. What is the purpose of the Version Catalog in Gradle?

Gradle Version Catalog (libs.versions.toml) centralizes dependency versions, library aliases, and bundle definitions in one file, referenced consistently across all module build.gradle files. This eliminates version string duplication and simplifies dependency management in multi-module projects.

Q163. What is the purpose of convention plugins in Android?

Convention plugins (build-logic module) encapsulate reusable build configuration (Android library setup, Kotlin options, test configuration) as Gradle plugins applied across feature modules. This avoids copy-pasting the same build.gradle configuration into every module, reducing boilerplate.

Q164. What is the purpose of the Android Gradle build cache?

The Gradle build cache stores outputs of executed build tasks. On subsequent builds, tasks whose inputs haven't changed restore outputs from cache instead of re-executing, dramatically reducing incremental build times. Remote build cache enables team-wide cache sharing in CI/CD environments.

Q165. What is the Hilt testing setup in Android?

For Hilt instrumentation tests, @HiltAndroidTest replaces @AndroidJUnit4. HiltAndroidRule triggers injection in test setup. @UninstallModules replaces production modules with test doubles. @BindValue injects fake implementations. This enables integration testing with real DI wiring and test fakes.

Q166. What is the purpose of the TestCoroutineDispatcher?

TestCoroutineDispatcher (now StandardTestDispatcher in Kotlin 1.6+) controls coroutine execution in unit tests. runTest{} creates a test coroutine scope that advances virtual time. advanceUntilIdle() runs all pending coroutines synchronously, enabling deterministic async coroutine testing without real delays.

Q167. What is Turbine in Android testing?

Turbine (by CashApp) is a testing library for Kotlin Flows. flow.test { val item = awaitItem(); assertEquals(expected, item); awaitComplete() } collects Flow emissions in a test coroutine, providing assertions on emission sequences without complex channel/collect() boilerplate.

Q168. What is the purpose of the Robot testing pattern?

The Robot Pattern wraps Espresso/Compose test interactions in domain-specific Robot classes (LoginRobot, HomeRobot). Tests read as behavior: loginRobot.enterCredentials().clickLogin().assertDashboardVisible(). This separates test DSL from implementation, making tests readable and maintainable as UI changes.

Q169. What is the purpose of Jetpack Compose semantics for testing?

Compose Semantics annotate UI elements with testable properties (contentDescription, role, stateDescription) used by the Compose testing framework (composeTestRule.onNode(hasContentDescription("Login")).performClick()). Semantics also power accessibility services (TalkBack screen reader).

Q170. What is accessibility in Android development?

Android accessibility ensures apps work for users with disabilities using assistive technologies (TalkBack screen reader, Switch Access, BrailleBack). Requirements: content descriptions for images, logical focus order, touch targets >48dp, sufficient color contrast, and proper focus announcement of dynamic content.

Q171. What is TalkBack in Android?

TalkBack is Android's built-in screen reader that announces UI elements via speech synthesis as the user explores by touch. Apps must set android:contentDescription on images, icons, and non-text elements. Interactive elements need meaningful labels; dynamic content uses announceForAccessibility().

Q172. What is the purpose of the Accessibility Scanner?

Accessibility Scanner (Google Play) analyzes Android app screens and suggests improvements: missing content descriptions, small touch targets, low contrast text, and unlabeled interactive elements. It integrates with Android Studio's lint checks for shift-left accessibility validation.

Q173. What is the purpose of the Security Network Config?

Network Security Configuration (res/xml/network_security_config.xml) defines custom network security settings per domain: certificate pinning, ClearText traffic permission, custom trust anchors (for debug builds). It replaces complex TrustManager code and enforces HTTPS-only communication with specific server certificates.

Q174. What is Certificate Pinning in Android?

Certificate Pinning validates a server's certificate against a known hash (pin) to prevent MITM attacks even with compromised CAs. Implemented via OkHttp's CertificatePinner or Android's Network Security Config. Backup pins prevent app breakage if the primary certificate expires.

Q175. What is ProGuard rule configuration?

ProGuard rules (-keep, -keepclassmembers, -dontwarn) in proguard-rules.pro prevent R8 from shrinking/obfuscating classes used via reflection, JNI, or external libraries. Data classes used for JSON serialization, Activity/Fragment subclasses, and custom Views often require -keep rules to function correctly in release builds.

Q176. What is the Android App startup optimization strategy?

App startup optimization strategies: defer non-critical initialization to background threads or lazy loading; use App Startup library to consolidate library initializations; apply Baseline Profiles for AOT compilation of startup paths; minimize work in Application.onCreate() and first Activity.onCreate().

Q177. What is the purpose of WorkManager constraints?

WorkManager Constraints define execution conditions for deferred work: NetworkType (CONNECTED, UNMETERED), charging (setRequiresCharging), battery not low (setRequiresBatteryNotLow), idle (setRequiresDeviceIdle), and storage not low. WorkManager waits until all constraints are satisfied before executing the Worker.

Q178. What is the difference between OneTimeWorkRequest and PeriodicWorkRequest?

OneTimeWorkRequest executes a Worker once when conditions are met. PeriodicWorkRequest executes at a minimum interval (15 minutes minimum enforced by system). Both support constraints, input data, and chaining. For periodic sync, PeriodicWorkRequest is preferred over AlarmManager for battery-efficient scheduling.

Q179. What is the purpose of the Android Vitals dashboard?

Android Vitals (Google Play Console) monitors key app health metrics: ANR rate, crash rate, slow startup rate, slow frames rate, and battery behavior. Google uses these metrics to determine app store ranking and may warn users about poorly performing apps below acceptable thresholds.

Q180. What is Firebase Crashlytics?

Firebase Crashlytics is a real-time crash reporting SDK that captures, groups, and prioritizes Android app crashes. It provides symbolicated stack traces, custom keys/logs for context, non-fatal exception logging, and version-specific crash trend analysis in the Firebase console.

Q181. What is the purpose of the Android Backup API?

Android Backup (Auto Backup and Key/Value Backup) automatically backs up app data to Google Drive. Auto Backup (API 23+) backs up all app data by default; include/exclude rules in backup_rules.xml customize what is backed up. Users can restore data on new devices or after reinstallation.

Q182. What is the purpose of the WindowManager in Android?

WindowManager manages the windows displayed by activities and system overlays. WindowMetrics provides current window dimensions for adaptive layout decisions. Jetpack WindowManager library abstracts foldable/large screen APIs (FoldingFeature, WindowSizeClass) for responsive multi-form-factor UI design.

Q183. What is WindowSizeClass in Android?

WindowSizeClass (Jetpack WindowManager) categorizes display windows into Compact, Medium, and Expanded width/height classes, abstracting specific pixel dimensions. Apps use size classes to switch between single-pane (Compact) and multi-pane (Expanded) layouts for adaptive smartphone/tablet/foldable design.

Q184. What is the purpose of the MotionLayout?

MotionLayout (ConstraintLayout subclass) defines complex property animations (position, size, color, alpha) between ConstraintSet states using MotionScene XML. Used for scroll-linked animations, shared element transitions, and complex interactive UI transitions driven by gestures or programmatic triggers.

Q185. What is the SharedElement transition in Android?

Shared Element Transitions animate matching elements between two Activities or Fragments during navigation — a thumbnail expanding to full screen or a card morphing to a detail view. Elements are matched by transitionName attribute; ActivityOptions.makeSceneTransitionAnimation() initiates the transition.

Q186. What is the Predictive Back feature in Android 14?

Predictive Back (Android 14+) shows an animated preview of the destination behind the current screen during a back gesture before committing the navigation. Apps must set android:enableOnBackInvokedCallback="true" and use OnBackPressedCallback (Jetpack) instead of overriding onBackPressed().

Q187. What is the purpose of the Jetpack Glance library?

Jetpack Glance provides a Compose-like API for building Android App Widgets and Wear OS Tiles. GlanceAppWidget implements the widget logic using Composable-like functions. Glance translates Compose-style code to RemoteViews, simplifying widget development significantly.

Q188. What is the purpose of the Health Connect API?

Health Connect (Jetpack) provides a centralized health and fitness data hub on Android. Apps read/write health data (steps, sleep, heart rate, nutrition) via a unified API with granular permission controls, replacing the fragmented Google Fit and Samsung Health direct API landscape.

Q189. What is the Android Privacy Sandbox?

Android Privacy Sandbox provides privacy-preserving advertising APIs (Attribution Reporting, Topics API, Protected Audience) that replace cross-app tracking via advertising IDs. These APIs enable ad targeting and measurement without exposing individual user identifiers to third-party SDKs.

Q190. What is the Photo Picker in Android?

The Android Photo Picker (API 33+ or via AndroidX Activity Result) provides a system-level media picker UI that allows users to grant partial access — selecting specific photos/videos to share with the app without granting full media library READ_MEDIA_IMAGES permission.

Q191. What is the Credential Manager API?

Credential Manager (Jetpack, Android 14+) unifies sign-in: Passkeys (FIDO2 biometric), traditional password-based credentials, and Google Sign-In in a single API. It eliminates multiple authentication SDK integrations and provides a consistent one-tap sign-in UI following the W3C WebAuthn standard.

Q192. What are Passkeys in Android development?

Passkeys are FIDO2 credentials replacing passwords — bound to the app's package and origin, authenticated via device biometrics (fingerprint/face). Credential Manager API creates and signs in with Passkeys; keys sync via Google Password Manager for cross-device access without phishing risk.

Q193. What is the purpose of the Android Game Development Kit (GDK)?

GDK provides Android-specific tools and libraries for game development: Android Frame Pacing (Swappy) for smooth game loop rendering at display refresh rate, Memory Advice API for adaptive quality based on memory pressure, and AGSL (Android Graphics Shading Language) for custom GPU shaders.

Q194. What is the purpose of the Vulkan API on Android?

Vulkan is a low-overhead, cross-platform 3D graphics API available on Android 7.0+. Unlike OpenGL ES, Vulkan gives explicit control over GPU memory management, command buffers, and render passes — enabling higher performance for game engines and GPU-compute applications needing maximum throughput.

Q195. What is the purpose of the Android Runtime (ART)?

ART (Android Runtime) is the managed runtime environment for Android apps, replacing Dalvik. ART uses AOT (Ahead-of-Time) compilation during install, JIT (Just-in-Time) compilation at runtime, and Profile-Guided Optimization (PGO) with Baseline Profiles for balanced startup speed and execution performance.

Q196. What is the purpose of AGP's namespace declaration?

The namespace property in build.gradle (android { namespace "com.example.app" }) replaces the applicationId declaration in AndroidManifest.xml for the R class package. This separation allows applicationId changes in build variants without affecting R class references throughout the codebase.

Q197. What is the purpose of the Compose Compiler Metrics?

Compose Compiler Metrics (enabled via Gradle flags) generate reports of each Composable's stability (stable/unstable parameters). Unstable parameters prevent smart recomposition skipping. Reports identify which classes need @Stable or @Immutable annotations to improve Compose rendering performance.

Q198. What is the Strong Skipping mode in Compose?

Strong Skipping mode (Compose Compiler 1.5.4+) allows Composables with unstable parameters to be skipped during recomposition if lambdas are memoized. This removes the need to make all model classes @Stable and significantly reduces unnecessary recompositions in complex Compose screens.

Q199. What is the purpose of Kotlin Multiplatform (KMP) in Android?

Kotlin Multiplatform allows sharing business logic (domain layer, data layer, ViewModels) between Android, iOS, web, and desktop platforms from a single Kotlin codebase. The shared module contains platform-agnostic code; Android and iOS apps implement platform-specific UI layers on top.

Q200. What are career paths after mastering Android Development?

Careers include Android Developer, Senior Android Engineer, Mobile Tech Lead, Android Architect, Kotlin Multiplatform Developer, Mobile Platform Engineer (building internal SDKs), Android Game Developer, Embedded Android Developer (automotive/IoT), and Principal Engineer at major technology companies.

Chat with us
📞 Call
DemoWhatsApp