tezvyn:

📱Mobile Dev

Mobile app development across platforms

351 bites

Android & Kotlin30 sec read

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.

Android & Kotlin30 sec read

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.

Android & Kotlin30 sec read

Started vs. Bound Services: Differences and Use Cases

Tests your grasp of Android component lifecycles. A strong answer defines each by its lifecycle control (who starts/stops it) and communication pattern (fire-and-forget vs. client-server), then gives distinct use cases.

Android & Kotlin30 sec read

How do you save UI state during screen rotation?

Tests your grasp of the Activity lifecycle and state restoration. A great answer explains the destroy/recreate cycle, notes that EditText handles its own state via its ID, and contrasts the modern ViewModel + SavedStateHandle with the older…

Android & Kotlin30 sec read

Describe the Android Activity lifecycle when navigating away and back

Tests understanding of resource management via lifecycle callbacks. A good answer traces onPause -> onStop -> onRestart -> onStart -> onResume, explaining what work happens in each.

Android & Kotlin30 sec read

How do you diagnose a memory leak with Android Studio Profiler?

This tests your systematic process for debugging memory issues. A good answer outlines using the Memory Profiler, forcing GC, capturing heap dumps, and analyzing object references. A red flag is just naming the tool without explaining the 'how'.

Android & Kotlin30 sec read

Gradle Build Types vs. Product Flavors

This tests your understanding of Gradle's build matrix for creating different app versions. A great answer defines build types (how it's built) vs. flavors (what is built) and explains that variants are the cross-product. A red flag is confusing their roles.

Android & Kotlin30 sec read

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`.

Android & Kotlin30 sec read

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.

Android & Kotlin30 sec read

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.

Android & Kotlin30 sec read

Explain the res/ directory and resource qualifiers for layouts

Tests your grasp of Android's core resource system. A good answer defines `res/` for non-code assets, explains how qualifiers like `layout-land` match device state, and provides a concrete example.

Android & Kotlin30 sec read

Project-level vs. module-level build.gradle files

This tests your grasp of Gradle's project/module structure. A good answer defines the project-level file for global settings (repositories, plugins) and the module-level for specifics (SDK versions, dependencies). A red flag is confusing their roles.

Android & Kotlin30 sec read

Describe the purpose of the AndroidManifest.xml file

This tests if you view the manifest as a contract with the OS. Define its role, then list key elements like components (`<activity>`), permissions (`<uses-permission>`), and hardware features. A red flag is just listing tags without explaining their purpose.

Android & Kotlin30 sec read

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

Tests understanding of Kotlin's type-safe builders via lambdas with receivers. A great answer defines model classes, creates a top-level builder function taking a `Receiver.() -> Unit` lambda, and defines nested builder methods.

Android & Kotlin31 sec read

Explain Kotlin's `reified` type parameters and their use case

Tests your grasp of JVM type erasure and Kotlin's solution. A great answer defines `reified` as making a generic type's Class accessible at runtime, explains this requires an `inline` function to substitute the type at the call site, and shows an example.

Android & Kotlin30 sec read

How does coroutine cancellation work internally?

This tests your grasp of cooperative cancellation. Explain that `cancel()` sets a flag, causing a `CancellationException` at the next suspension point. A non-suspending loop must explicitly check `isActive` to stop.

Android & Kotlin30 sec read

Explain backpressure in Kotlin Flows and its management operators

This tests your understanding of Flow's sequential nature and strategies for decoupling producers and consumers. Explain default suspension, then detail buffer(), conflate(), and collectLatest(). A red flag is confusing conflate() with collectLatest().

Android & Kotlin30 sec read

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.

Android & Kotlin30 sec read

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.

Android & Kotlin31 sec read

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.