๐ŸŽฏ Android Interview Preparation and Career

Top 50 Android Interview Questions and Answers

These 50 questions cover what Android interviews actually test in 2026: fundamentals, Kotlin, coroutines, Compose, architecture, data, performance, security and release. Each answer is short enough to say aloud, with links to deeper guides.

โœ๏ธ Yunok Tech ๐Ÿ“… Updated โฑ 8 min read ๐ŸŽฏ Intermediate
On this page
  1. Fundamentals and lifecycle (1โ€“5)
  2. Kotlin (6โ€“10)
  3. Coroutines and Flow (11โ€“15)
  4. Jetpack Compose (16โ€“20)
  5. Architecture (21โ€“25)
  6. Data and networking (26โ€“30)
  7. Performance (31โ€“35)
  8. Security (36โ€“40)
  9. Testing (41โ€“45)
  10. Release and tooling (46โ€“50)
  11. How to use these answers
  12. Frequently asked questions
  13. Conclusion

Interviewers rarely want memorised definitions. They want to know whether you understand why Android works the way it does, and whether you've built real things. Use these answers as a starting point, then add an example from your own projects to each.

Topics covered in Android interviews Ten topic areas: fundamentals and lifecycle, Kotlin, coroutines and Flow, Jetpack Compose, architecture, data and networking, performance, security, testing, and release and tooling. Fundamentals Kotlin Coroutines/Flow Compose Architecture Data Performance Security Testing Release/tools
Ten areas, five questions each.

Fundamentals and lifecycle (1โ€“5)

1. What are the four Android app components?

Activities (UI entry points), Services (work without UI), Broadcast Receivers (respond to events) and Content Providers (share structured data). They're declared in the manifest and can be started by the system independently. See App Components.

2. Explain the Activity lifecycle.

onCreate โ†’ onStart โ†’ onResume (visible, interactive), then onPause โ†’ onStop as it leaves the foreground, and onDestroy when finishing or being recreated. Do UI-visible work between start and stop, and release resources symmetrically.

3. What happens on a configuration change?

By default the Activity is destroyed and recreated (rotation, locale, dark mode). ViewModels survive. Small UI state can be saved with rememberSaveable or onSaveInstanceState.

4. What is process death, and how do you handle it?

The system can kill a backgrounded app's process to reclaim memory. When the user returns, the Activity is recreated in a new process, but ViewModels are gone. Use SavedStateHandle and rememberSaveable for critical UI state, and persistence for data. See How an App Works Internally.

5. What causes an ANR?

Blocking the main thread too long (around 5 seconds for input), for example with disk or network I/O, lock contention, or slow onReceive. Fix it by moving work off the main thread. See ANRs.

Kotlin (6โ€“10)

6. How does Kotlin null safety work?

Types are non-null by default, and T? allows null. The compiler forces handling via ?., ?:, smart casts or !!. Platform types from Java can still cause NPEs.

7. data class vs regular class?

A data class generates equals/hashCode/toString/copy/componentN from primary-constructor properties. It's ideal for immutable models and UI state.

8. When do you use a sealed class or interface?

For a closed set of types, such as UI states or results, so when expressions are exhaustive and the compiler flags unhandled cases.

9. What are scope functions?

let, run, with, apply and also differ in receiver (this or it) and return value (lambda result or the object). Use them for clarity, not nesting.

10. What does inline do, and what is reified?

inline copies the function and its lambdas into the call site, avoiding allocations. reified type parameters (only in inline functions) keep the type available at runtime. See Generics and Reified.

Coroutines and Flow (11โ€“15)

11. What is a suspend function?

A function that can pause without blocking its thread and resume later. It doesn't automatically run in the background. Main-safety comes from withContext or main-safe libraries.

12. What is structured concurrency?

Coroutines run in scopes. Cancelling a scope cancels its children, and a child failure cancels the parent (unless supervised). This prevents leaks. Use viewModelScope and lifecycleScope.

13. Dispatchers.IO vs Default vs Main?

IO for blocking I/O, Default for CPU work, Main for UI updates.

14. Flow vs StateFlow vs SharedFlow?

Flow is cold and runs per collector. StateFlow is hot, always has a value, and suits UI state. SharedFlow is a hot, configurable broadcast. See the comparison.

15. How do you collect flows safely in the UI?

collectAsStateWithLifecycle() in Compose, or repeatOnLifecycle(STARTED) in Views, so collection stops in the background.

Jetpack Compose (16โ€“20)

16. What is recomposition?

Re-running composables whose read state changed. Compose skips composables whose inputs are unchanged and stable.

17. remember vs rememberSaveable?

remember survives recomposition. rememberSaveable also survives configuration changes and process death via the saved-state Bundle.

18. What is state hoisting?

Moving state up to a caller and passing value plus onValueChange down, which makes components stateless, reusable and testable.

19. What are side-effect APIs?

LaunchedEffect (coroutines tied to composition and keys), DisposableEffect (setup and cleanup), SideEffect (publish after recomposition), and rememberCoroutineScope (launching from callbacks).

20. How do you improve Compose performance?

Measure release builds, use stable keys in lazy lists, defer fast-changing state reads to layout or draw, use derivedStateOf, avoid heavy work in composition, and add Baseline Profiles.

Architecture (21โ€“25)

21. Explain MVVM on Android.

The View renders state and sends events, the ViewModel holds UI state and logic, and the Model (repositories) provides data. State flows down and events flow up.

22. MVVM vs MVI?

Both use unidirectional flow. MVI formalises user actions as intents and state changes in a pure reducer. See MVVM vs MVI.

23. What is a repository?

An abstraction over data sources (network, database) that exposes data to the app and owns the source of truth and caching policy.

24. Are use cases necessary?

Only when there's real, reusable or cross-repository business logic. The domain layer is optional.

25. Why dependency injection, and why Hilt?

DI makes classes testable and configurable by passing dependencies in. Hilt provides compile-time-checked DI integrated with Android lifecycles.

Data and networking (26โ€“30)

26. How does Retrofit work with coroutines?

You declare suspend functions on an annotated interface. Retrofit generates the implementation, and OkHttp performs I/O off the main thread.

27. Room vs DataStore?

Room for structured, queryable collections. DataStore for small settings. See Room vs DataStore.

28. What does offline-first mean?

The local database is the source of truth, writes go local first, and sync happens in the background with conflict handling.

29. How do you handle API errors?

Classify IO, HTTP and parsing errors into typed errors at the boundary, map them to user-facing states, and retry only transient failures.

30. How do you implement pagination?

Paging 3: PagingSource, Pager, cachedIn(viewModelScope), and LazyPagingItems. Add RemoteMediator with Room for offline support.

Performance (31โ€“35)

31. How do you reduce startup time?

Defer non-critical initialisation, keep Application.onCreate light, ship Baseline Profiles, and measure with Macrobenchmark.

32. What are Baseline Profiles?

Lists of critical classes and methods shipped with the app, so ART compiles them ahead of time, which improves startup and jank from the first run.

33. How do you find memory leaks?

LeakCanary in debug builds, and heap dumps in Android Studio. The usual causes are Context or View references in long-lived objects.

34. What does R8 do?

It shrinks, optimises and obfuscates code, and removes unused resources with resource shrinking. It needs keep rules for reflection.

35. How do you diagnose jank?

Use system traces or Macrobenchmark FrameTimingMetric, find long main-thread work during janky frames, and fix the cause.

Security (36โ€“40)

36. How do you store API keys securely?

You can't hide secrets in an APK. Keep secrets on a server, and restrict any client keys. See Secure API Keys.

37. What is the Android Keystore?

A system that stores cryptographic keys, often in secure hardware, and performs operations without exposing key material.

38. What's the risk of exported components?

Other apps can invoke them. Export only what's necessary, and validate all input.

39. What is Play Integrity?

An API that gives your server signed verdicts about app, device and account integrity for risk decisions.

40. How do runtime permissions work?

Dangerous permissions are requested at runtime. Check, explain in context, request, and handle denial, including "don't ask again".

Testing (41โ€“45)

41. Unit vs instrumented tests?

Unit tests run on the JVM (fast, for logic). Instrumented tests run on a device or emulator (for Android integration and UI).

42. How do you test coroutines?

runTest, test dispatchers (replace Main with a rule), and injected dispatchers. Virtual time skips delays.

43. Fakes vs mocks?

Fakes are lightweight working implementations and are often preferred for repositories. Mocks verify interactions.

44. How do you test Compose UI?

createComposeRule, finders on the semantics tree, actions and assertions, with stateless screens fed with test state.

45. What is screenshot testing?

Rendering composables and comparing them against reference images to catch visual regressions.

Release and tooling (46โ€“50)

46. compileSdk vs targetSdk vs minSdk?

APIs available at compile time, the behaviour version you've tested against, and the oldest supported Android version.

47. What is Play App Signing?

Google holds the app signing key, and you sign uploads with an upload key that can be reset if lost.

48. What is an Android App Bundle?

The publishing format from which Play generates optimised APKs per device configuration.

49. What is WorkManager for?

Deferrable, guaranteed background work with constraints, which survives app restarts and reboots.

50. How has AI changed Android development?

AI assistants speed up boilerplate, tests and debugging, but developers must verify output. AI features in apps use on-device (Gemini Nano) or cloud models. See How AI Is Changing Android Work.

How to use these answers

  • Add a real example from your projects to each answer.
  • Mention trade-offs: interviewers value judgement over definitions.
  • Practise saying answers aloud in 30โ€“60 seconds.

Frequently asked questions

Are XML View questions still asked?

Sometimes, especially for companies with legacy code: RecyclerView, Fragments, View lifecycle. Be ready to discuss both Views and Compose.

Do interviews include coding tasks?

Usually: a small feature, a take-home or live coding. See Coding Interview Problems.

Conclusion

Strong Android interview answers are short, accurate and grounded in experience, covering why things work and the trade-offs involved. Use these 50 as a map, go deeper in your weaker areas, and practise explaining your own projects.

Next step: go deeper on language questions in Kotlin Interview Questions for Experienced Developers.

Official references

๐Ÿ“ฑ Apps built by Yunok Tech

Real Android apps on Google Play, free to download.

See all our apps โ†’

Ready to build real Android applications?

Interviews reward developers who can explain why, not just how. Build the Kotlin, Compose and architecture depth that lets you discuss real trade-offs with confidence.

Move beyond theory and strengthen your Android development skills with Yunoktech's Android course. Learn core concepts, practical implementation, modern Android development techniques, and the reasoning behind building maintainable applications.

Explore the Android course and take your next step as an Android developer.

Share: LinkedIn X / Twitter WhatsApp