Android Interview Questions & Answers : Real Scenario Based with In-Depth Explanations
A deep, easy-to-understand interview preparation guide for Android developers explained the way a senior engineer would explain it to you…
June 12, 2026
AndroidKotlinJetpack ComposeAndroid InterviewsProgramming
Q1. A user is filling a long form. They rotate the screen and everything they typed disappears. What happened, and how do you fix it?
Q2. Walk me through the Activity lifecycle, and tell me which method runs first when a phone call interrupts the app.
Q3. Your app saves user notes in onPause(). A tester says notes are sometimes lost. Why, and where should you actually save?
Q4. What is the difference between onCreate(), onStart(), and onResume()? Give a real reason you'd use each.
Q5. What is the Application class, and when would you genuinely need it?
Q6. Explain the four Android components and give a real-world example of each.
Q7. What is the AndroidManifest.xml and what breaks if you forget to declare something in it?
Q8. The interviewer says: "My app shows a blank white screen for a second before launching. Why?"
Q9. What is the difference between an explicit Intent and an implicit Intent? When do you use each?
Q10. What is a Bundle and why not just use a global variable to pass data between screens?
Q11. What is `setContentView()` actually doing under the hood?
Q12. The system killed your app while it was in the background and the user lost their place. How do you handle this gracefully?
Q13. When would you use a Fragment instead of an Activity? Give a real product reason.
Q14. Two fragments need to talk to each other. How do you do it the right way?
Q15. What is the Fragment lifecycle's relationship with its View, and why does this cause memory leaks?
Q16. Explain the back stack with a real navigation example.
Q17. What is the Jetpack Navigation component and what real problem does it solve?
Q18. A user taps a notification and should land on a specific screen deep inside the app. How?
Q19. What is a PendingIntent and why is it called "pending"?
Q20. launchMode "singleTop" vs "singleTask" — explain with a scenario.
Q21. What's the difference between `finish()` and pressing the Back button?
Q22. Why is "single Activity, many Fragments/Composables" considered modern best practice?
Q23. Your scrolling list (RecyclerView) is laggy and stutters. Walk me through how you'd fix it.
Q24. What is a ViewHolder and what real problem does it solve?
Q25. What is DiffUtil and why does it matter for the user?
Q26. Explain the three phases of how a View is drawn: measure, layout, draw.
Q27. ConstraintLayout vs LinearLayout vs RelativeLayout — when does each make sense?
Q28. What is Jetpack Compose, and how is it fundamentally different from the XML View system?
Q29. What is "recomposition" in Compose and why can it hurt performance if you're careless?
Q30. Explain `remember` vs `rememberSaveable` with a scenario.
Q31. What is state hoisting in Compose and why do interviewers love it?
Q32. In Compose, how do you run a one-time action like showing a Snackbar or starting an animation when a screen appears?
Q33. How does Compose talk to ViewModel and observe data?
Q34. Can you mix Compose and XML Views in the same app? Why would you?
Q35. A designer wants a custom view that doesn't exist in the framework (e.g., a circular progress meter). How do you build it?
Q36. Why does Android crash if you do network calls on the main thread? Explain the main thread.
Q37. What is an ANR, what causes it, and how do you prevent it?
Q38. You've already used threads. What do coroutines give you that plain threads don't, and why do they fit Android so well?
Q39. What is `suspend` and what actually happens when a suspend function is called?
Q40. Difference between `launch` and `async`? When do you use each?
Q41. What are Dispatchers and which one do you use for what?
Q42. What is structured concurrency and what real bug does it prevent?
Q43. The user navigates away while a network call is in flight. How do you make sure it's cancelled?
Q44. What is a CoroutineScope vs a CoroutineContext vs a Job?
Q45. What is a Flow, and how is it different from a suspend function returning a list?
Q46. Explain StateFlow vs SharedFlow vs LiveData — when do you reach for each?
Q47. What is WorkManager and when is it the right tool (vs a coroutine or service)?
Q48. The interviewer asks: "Schedule a sync that only runs on Wi-Fi and when charging, and retries on failure." How?
Q49. What is the difference between a foreground service, a background service, and WorkManager today?
Q50. What is a Handler and Looper? (The classic "how does the main thread actually work" question.)
Q51. Walk me through what happens from the moment a user taps "Load" to data appearing on screen.
Q52. What is Retrofit and why not just use raw HttpURLConnection?
Q53. What is an OkHttp Interceptor and give two real uses.
Q54. A token expires mid-session and APIs start returning 401. How do you refresh it without breaking the user's flow?
Q55. How do you handle errors from the network so the UI shows something sensible?
Q56. The user is on a flaky train connection. How do you make networking resilient?
Q57. What is the difference between Gson, Moshi, and kotlinx.serialization?
Q58. What is pagination and why does it matter for a feed with thousands of items?
Q59. A user toggles dark mode. After restarting the app, it forgot the setting. Where should you store it and why?
Q60. SharedPreferences vs DataStore vs Room vs Files — how do you choose?
Q61. What is Room and what does it give you over raw SQLite?
Q62. Explain Entity, DAO, and Database in Room with a simple example.
Q63. You add a new column to a table and existing users' apps crash on update. Why, and how do you fix it?
Q64. What does it mean that a Room Flow query is "reactive," and why is it powerful?
Q65. Where should you NOT store sensitive data like auth tokens, and where should you?
Q66. Internal storage vs external storage vs scoped storage — what's the difference?
Q67. How would you implement an offline-first feature (e.g., a notes app that works without internet)?
Q68. What is a transaction and when do you need one in Room?
Q69. Walk me through MVVM using a real screen as an example.
Q70. Why is the ViewModel so important? What problem was it invented to solve?
Q71. What is a Repository and why add another layer?
Q72. Explain Clean Architecture's layers and the dependency rule.
Q73. What is a Use Case (Interactor) and when is it worth having?
Q74. MVVM vs MVI — what's the difference and why might you choose MVI?
Q75. What is "Unidirectional Data Flow" (UDF) and why does it reduce bugs?
Q76. What is the Observer pattern and where does Android use it constantly?
Q77. What is dependency inversion and why does it make code testable?
Q78. A junior wrote all the logic inside the Activity. What problems will this cause and how do you refactor?
Q79. What is the Singleton pattern and what's the danger of overusing it in Android?
Q80. How do you decide how much architecture an app needs?
Q81. What is dependency injection, and can you give an analogy that makes it click?
Q82. What is Hilt and what does it do for you?
Q83. Constructor injection vs field injection — which is better and why?
Q84. What is a scope in DI, and what bug does the wrong scope cause?
Q85. Could you do DI manually without Hilt? When might you?
Q86. What is a memory leak in Android, give the most common cause, and how to detect it.
Q87. Why are inner classes and anonymous listeners a classic leak source?
Q88. The app's memory keeps climbing while scrolling an image feed. What's going wrong?
Q89. What is "jank" and the 16ms rule?
Q90. What is overdraw and how do you reduce it?
Q91. Your app drains battery fast. What are the usual suspects?
Q92. What is the garbage collector's relationship to performance? Can you cause GC problems?
Q93. What is StrictMode and how does it help you ship a faster app?
Q94. How do you reduce your app's APK/AAB size, and why does it matter?
Q95. What tools do you use to actually find performance problems (not guess)?
Q96. How do you store an API key or secret safely in an Android app?
Q97. What is HTTPS and certificate pinning, and what attack does pinning stop?
Q98. What is the principle of least privilege with permissions, and why request permissions at runtime?
Q99. How do you prevent SQL injection and unsafe data handling?
Q100. What are common Android security mistakes you'd check for in a code review?
Q101. What are the types of tests in Android and what does each cover?
Q102. How do you unit test a ViewModel that calls a repository?
Q103. What is a fake vs a mock, and which do you prefer?
Q104. How do you test code that depends on coroutines and Dispatchers?
Q105. What makes a test "good" vs a test that just exists for coverage?
Q106. Your app crashes with a NullPointerException coming from Kotlin. How is that even possible if Kotlin is null-safe?
Q107. Explain `val` vs `var` vs `const val`, and why immutability matters.
Q108. What are data classes and why are they perfect for UI state and API models?
Q109. Explain higher-order functions and lambdas with a real Android use.
Q110. What are extension functions and when do they make code cleaner?
Q111. What is the difference between == and === in Kotlin?
Q112. Explain `let`, `apply`, `run`, `also`, and `with` — the scope functions everyone confuses.
Q113. What actually makes a function a "composable," and why can't you call one from a normal function?
Q114. Explain the three phases of a Compose frame: composition, layout, drawing. Why does knowing them help performance?
Q115. `mutableStateOf` — how does changing it actually cause the screen to update?
Q116. The order of Modifiers changes the result. Why, and give an example.
Q117. What is `LazyColumn`, how is it different from a `Column` inside a scroll, and why do `key`s matter?
Q118. What does "stability" mean in Compose, and how does it decide whether a composable can be skipped?
Q119. What is recomposition scope, and why does reading state "lower" in the tree improve performance?
Q120. Walk me through the side-effect APIs: `LaunchedEffect`, `DisposableEffect`, `SideEffect`, `rememberCoroutineScope`, `rememberUpdatedState`.
Q121. What's the difference between `LaunchedEffect(Unit)` and `LaunchedEffect(someKey)`? Give a bug each one causes if misused.
Q122. How do you collect a ViewModel's `StateFlow` in Compose correctly, and what's wrong with plain `collectAsState()`?
Q123. What is `derivedStateOf` and how is it different from just computing a value in the composable?
Q124. What is `snapshotFlow` and when would you use it?
Q125. What is `remember(key)` with a key, and how is it different from plain `remember`?
Q126. What is `CompositionLocal`, and what problem does it solve? Give a real example.
Q127. How does navigation work in Compose, and how do you pass arguments and pop the back stack?
Q128. Where should navigation state and events live in the composable or the ViewModel? Defend your choice.
Q129. How do animations work in Compose? Walk through the common APIs.
Q130. What are slot APIs / the "content lambda" pattern, and why is it better than lots of boolean parameters?
Q131. Why must composables be idempotent and free of side effects in their body? What breaks if they aren't?
Q132. How do you build a fully custom layout in Compose (something Row/Column/Box can't express)?
Q133. What's the difference between `Modifier.composed { }`, a regular Modifier factory, and why did `composed` get a bad reputation?
Q134. How do you handle a one-time event (show a toast, navigate, show a snackbar) so it doesn't re-fire on rotation/recomposition?
Q135. Your Compose screen recomposes far more than expected. How do you diagnose and fix it?
Q136. What changed with the Compose Compiler being merged into Kotlin, and what is "strong skipping mode"?
Q137. How do you test a Compose UI? What's the basic structure?
Q138. A junior says "Compose is slower than XML." How do you respond?