Intermediate everything in Android & Kotlin, page 6

Describe state hoisting in Jetpack Compose.
Tests your grasp of unidirectional data flow. Explain state hoisting is moving state up to make composables stateless. This improves reusability, testability, and creates a single source of truth. A red flag is defining it without explaining the benefits.

Explain Recomposition in Jetpack Compose
Tests your grasp of Compose's declarative model. A good answer defines recomposition, explains state-read triggers, and details how stability and positional memoization enable skipping. A red flag is assuming any state change redraws the entire UI.
How does ConstraintLayout enable complex, responsive UIs?
Tests your grasp of modern Android UI performance and responsiveness. Explain how relative positioning flattens hierarchies, then define chains for distributing space and barriers for handling dynamic content size.

Styles vs. Themes and Attribute Resolution in Android
This tests your grasp of Android's resource indirection. A Style is a set of attributes for one View type. A Theme is a collection of named attributes for an app or Activity. ?attr is resolved at runtime against the Theme, while @color is a direct.

Static vs. Dynamic BroadcastReceivers: Implications and Restrictions
This tests your knowledge of Android's background execution limits. A good answer defines static and dynamic registration, explains the restrictions since Android 7/8, and gives use cases. A red flag is ignoring the modern API limitations.

When and why use a Foreground Service on modern Android?
Tests understanding of background work restrictions. A great answer defines the use case for user-visible tasks, explains the mandatory notification, and details the startForegroundService() flow.

singleTask Launch Mode: A -> B -> C Back Stack
This tests your understanding of Android's singleTask launch mode and task management. A good answer explains that A and B form a stack in one task, while C launches into a new, separate task, becoming its root.

How does a ViewModel survive configuration changes?
Tests understanding of ViewModel's scope, separate from the Activity lifecycle. A ViewModel is retained by a ViewModelStore, which persists across configuration changes. The new Activity instance then reconnects to the same ViewModel.

What is the Android Debug Bridge (ADB)?
This tests practical command-line proficiency and understanding of the host-device link. A good answer defines the client-server-daemon architecture and gives two commands like adb install and adb logcat.

How do you debug a running app's view hierarchy?
Tests practical debugging skills. A good answer names the Layout Inspector, describes the component tree and attributes panes, and explains how the 3D view finds hidden elements. A red flag is only naming the tool without explaining its use.

Explain Gradle product flavors with a free/pro app example
This tests your grasp of the build variant matrix, not just flavors. A great answer defines flavors, explains how they combine with build types, details Gradle config (applicationIdSuffix), and mentions source sets.

How do you debug an app crash in Android Studio?
Tests your systematic problem-solving process. A great answer outlines reproducing the crash, analyzing the Logcat stack trace for the FATAL EXCEPTION, and then using strategic breakpoints and the variable inspector to find the root cause of the bad state.

Explain Kotlin's declaration-site variance with in and out
This tests your grasp of generic type safety and API design. Explain that out marks covariant producers (e.g., List<out E>) and in marks contravariant consumers, then contrast this cleaner declaration-site model with Java's repetitive use-site wildcards.

What is a CoroutineDispatcher and when to use IO vs Default?
Tests your grasp of thread pool strategy for CPU vs. I/O-bound tasks. A good answer defines Dispatchers, contrasts the fixed-size Default pool (for CPU work) with the larger IO pool (for blocking I/O), and gives clear examples.

Hot vs. Cold Streams: StateFlow vs. Flow in Android
This tests your grasp of stream lifecycles. A great answer defines cold Flow (lazy, per-collector) vs. hot StateFlow (active, shared state) and uses a ViewModel UI state scenario. A red flag is mischaracterizing a Flow as a one-time operation.

Explain Structured Concurrency in Kotlin Coroutines
Tests your grasp of coroutine lifecycle management. A great answer defines the parent-child relationship within a CoroutineScope, explains cancellation propagation, and details how exceptions cancel the entire hierarchy.

Explain and implement a Kotlin higher-order function
Tests understanding of first-class functions and lambda usage. First, define a higher-order function (HOF) as one that takes/returns functions. Then, implement the requested function, iterating to apply the predicate and transform.

lateinit var vs. val by lazy in Android
Tests your grasp of Kotlin property initialization and its lifecycle implications. A good answer contrasts mutability (var/val), initialization timing, and thread safety.

What are the advantages of a Kotlin data class and its functions?
Tests knowledge of Kotlin's idiomatic features. A good answer explains the main advantage (boilerplate reduction), lists generated functions like toString() and equals(), and describes copy() for immutable state updates.

What is a Kotlin extension function? Write one for String.
Tests adding functionality to classes without inheritance. Define extension functions as static utilities, explain their use case (e.g., third-party libs), then write hasWhitespace using an idiomatic method like any. A red flag is manually looping.
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