Skip to content
tezvyn:

Android & Kotlin

Jetpack Compose, Android Studio, Kotlin, Material You

113 bites

Test yourself: Top 30 advanced Android & Kotlin interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Advanced everything in Android & Kotlin, page 3

What does inline solve for higher-order functions, and what is reified?
advanced2 min read

What does inline solve for higher-order functions, and what is reified?

It tests lambda overhead and type erasure. Answer: inline flattens lambdas into call sites to remove allocation and virtual calls; reified needs inline so the compiler knows the concrete type at the call site, enabling is T checks.

Compare Kotlin apply and let scope functions
advanced2 min read

Compare Kotlin apply and let scope functions

Apply uses this and returns receiver for configuration; let uses it and returns lambda result for null-safe transforms.

When would you use a sealed class instead of an enum?
advanced2 min read

When would you use a sealed class instead of an enum?

This tests closed hierarchies versus singleton constants. A strong answer contrasts enums with sealed class instances, shows a NetworkResult example with data-bearing branches, and highlights exhaustiveness.

Navigate between feature modules without direct dependencies?
advanced2 min read

Navigate between feature modules without direct dependencies?

Tests dependency inversion in modular apps. Answer by defining navigation interfaces in a shared module, implementing them in the :app module, and using DI to connect them. A red flag is suggesting direct module dependencies or using reflection for navigation.

Combine two network sources using Coroutines and Flow
advanced2 min read

Combine two network sources using Coroutines and Flow

Tests your grasp of async data combination and state management. A good answer uses Flow.combine in a ViewModel, fed by a Repository, emitting a sealed class for UI state (Loading, Success, Error). A red flag is trying to combine state in the UI layer itself.

How do you diagnose and fix excessive recomposition in Jetpack Compose?
advanced2 min read

How do you diagnose and fix excessive recomposition in Jetpack Compose?

This tests your grasp of Compose's stability system. First, use Layout Inspector to find high-recomposition areas. Then, enable and analyze the Compose compiler report to diagnose unstable parameters (like List) or lambdas.

`remember` vs. `rememberSaveable`: When and why to use each?
advanced2 min read

`remember` vs. `rememberSaveable`: When and why to use each?

Tests understanding of state survival in Compose. A good answer contrasts remember (for composition) with rememberSaveable (for activity recreation/process death), explaining its use of the Bundle mechanism. A red flag is confusing the two lifecycles.

advanced2 min read

ContentProvider Lifecycle During Cross-Process Queries

Tests knowledge of Android's IPC, process management, and threading for ContentProviders. The ContentResolver asks AMS to find/start the provider's process. The provider's onCreate() runs on the main thread, but the query() itself runs on a binder thread.

Bound Service Lifecycle with Config Changes & Multiple Clients
advanced2 min read

Bound Service Lifecycle with Config Changes & Multiple Clients

Tests your grasp of bound Service lifecycles. Explain that with BIND_AUTO_CREATE, the Service survives an Activity's config change recreation. It's only destroyed after the *last* client unbinds. A red flag is assuming the Service dies with the first client.

Explain app restoration after Android process death
advanced2 min read

Explain app restoration after Android process death

Tests your grasp of process death vs. configuration changes. A good answer explains that the entire app process is recreated, starting with onCreate, and state must be restored from the SavedStateHandle.

advanced2 min read

Managing Sensitive Information in Gradle Builds

Tests secure credential handling in Android builds. A good answer uses a git-ignored .properties file, the secrets-gradle-plugin to parse it, and accesses keys via BuildConfig. A red flag is storing keys directly in build.gradle or committing them.

How do you diagnose a memory leak using the Android Studio Profiler?
advanced2 min read

How do you diagnose a memory leak using the Android Studio Profiler?

This tests your practical skill with the Android Memory Profiler, not just theory. A great answer involves capturing a heap dump, filtering for unreachable objects, and inspecting the reference tree to find the leak's source.

Explain Gradle Build Types vs. Product Flavors
advanced2 min read

Explain Gradle Build Types vs. Product Flavors

Tests your grasp of Gradle's build matrix. A great answer defines build types for lifecycle (debug/release) and product flavors for user-facing versions (free/paid), then explains how they combine into variants.

Implement a type-safe DSL for a UI component in Kotlin
advanced2 min read

Implement a type-safe DSL for a UI component in Kotlin

This tests your ability to design clean, hierarchical APIs using Kotlin's idiomatic features. A great answer defines model classes, then uses higher-order functions with lambdas with receiver to create a nested structure, and mentions @DslMarker for scope…

What is a reified type parameter in Kotlin?
advanced2 min read

What is a reified type parameter in Kotlin?

Tests your grasp of JVM type erasure and Kotlin's solution. Explain that reified makes a generic type accessible at runtime inside an inline function, avoiding manual Class passing. A red flag is failing to link reified directly to inline functions.

How does coroutine cancellation work internally?
advanced2 min read

How does coroutine cancellation work internally?

Tests your grasp of cooperative cancellation. A good answer explains that cancel() sets a flag, suspend functions check it and throw CancellationException, and non-suspending loops need manual isActive checks.

Explain backpressure in Kotlin Flows and its management operators
advanced3 min read

Explain backpressure in Kotlin Flows and its management operators

This tests your understanding of Flow's pull-based nature and performance tuning. A great answer defines suspension as the default backpressure, then details how buffer, conflate, and collectLatest optimize it.

Explain `inline` and `reified` in Kotlin
advanced2 min read

Explain `inline` and `reified` in Kotlin

Tests your grasp of JVM performance costs and type erasure. A great answer explains how inline avoids object allocation for lambdas, and how this enables reified to bypass type erasure for runtime checks. A red flag is just saying 'it's for performance'.

Compare and contrast Kotlin's `apply` and `let` scope functions
advanced2 min read

Compare and contrast Kotlin's `apply` and `let` scope functions

This tests your grasp of idiomatic Kotlin scope functions. apply uses this and returns the object, ideal for configuration. let uses it and returns the lambda result, useful for null-safe chaining.

When would you use a sealed class instead of an enum?
advanced2 min read

When would you use a sealed class instead of an enum?

This tests your understanding of state representation. Explain that sealed classes define a hierarchy of types that can hold different data, while enums are a set of singleton constants.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles