Easy everything in Mobile Dev, page 7

Why choose DataStore over SharedPreferences for a toggle?
This tests your grasp of modern Android storage safety beyond syntax. A strong answer names DataStore's async coroutines API, type safety, transactions, and migration support. A red flag is claiming SharedPreferences is simpler while ignoring ANR risk.

What are Room's three main components and their functions?
Tests whether you know Room's architectural layers. Name the three: Database holds config and is the access point; Entity represents a table schema; DAO defines SQL operations. Red flag: confusing DAOs with Repositories or claiming Room is a full ORM.

How do you pass data between Fragments with Jetpack Navigation?
Define args in nav graph XML, navigate with generated Directions, read with navArgs() in target Fragment.

Explain the roles of ViewModel, Repository, and data source in MVVM
Tests your grasp of unidirectional data flow and separation of concerns in Android MVVM. A strong answer maps ViewModel to UI state, Repository to data coordination, and Room or Retrofit to I/O.

What is a ViewModel and what lifecycle problem does it solve?
Tests config-change survival: ViewModel outlives Activity recreation so state survives rotation. Strong answer notes it holds non-serializable data and separates concerns, but does not survive process death.

Arrange UI elements vertically or horizontally in Jetpack Compose
Tests declarative layout fundamentals. Good answers name Column and Row, explain Modifier as an ordered chain of decoration and layout behavior, and note order changes semantics. Red flag: calling Modifier "just styling" or confusing it with LinearLayout.

What is remember in Compose and how do you use mutableStateOf?
This tests state survival across recompositions. Good answers say remember caches values across recompositions, pairs with mutableStateOf for observable state, and shows a counter. A red flag is mutableStateOf without remember, state resets per recomposition.

Explain the difference between LinearLayout, RelativeLayout, and FrameLayout
Understanding of ViewGroup measurement and simplicity versus flexibility tradeoffs. LinearLayout for 1D lists, RelativeLayout for complex sibling rules, FrameLayout for single-child or overlap.

Activity rotation: what happens to EditText text?
Rotation destroys and recreates the Activity; EditText auto-saves text if it has an ID, else onSaveInstanceState or SavedStateHandle.

Describe the Android Activity lifecycle and callback order
Away calls onPause then onStop; back calls onRestart, onStart, onResume; onCreate only runs after destruction.

What is the res directory and how do you use orientation qualifiers?
Res/ holds non-code assets; create layout-port/ and layout-land/ with identical XML filenames for automatic framework selection.

What is the difference between project-level and module-level build.gradle?
Project level sets plugin repos and shared versions; module level sets dependencies, build types, and flavors.

What is AndroidManifest.xml and what key elements does it declare?
This tests your grasp of the system-app contract. Good answers cover component registration, permissions, and build metadata like package name and target SDK. A red flag is omitting install-time system discovery.

What is a suspend function in Kotlin and its compiler rules?
This tests your understanding of suspendable computations and compiler transformation. A strong answer notes non-blocking suspension, the call-from-suspend-context rule, and compiler support for pausing and resuming. A red flag is claiming they block threads.

Explain the difference between launch and async in Kotlin Coroutines
This tests scope behavior and side effects versus results. A strong answer says launch returns a Job for side effects, async returns a Deferred for results, and both are scope children. A red flag is using async for all tasks or ignoring exception handling.

Explain val vs var in Kotlin and null safety risks
Val is read-only, var is mutable; nullables use ? like String?; risk is NullPointerException if checks are missed.

How do you pass data between Fragments with Jetpack Navigation?
Tests knowledge of modern, type-safe argument passing. A good answer defines the argument in the nav graph XML, uses the Safe Args plugin to generate Directions/Args classes, navigates with the action, and retrieves the data in the destination via `by…

Explain ViewModel, Repository, and Data Source in MVVM
This tests your understanding of separation of concerns. A great answer defines ViewModel (UI state), Repository (data abstraction), and Data Sources (implementation), then explains the unidirectional data flow.

What is a Jetpack ViewModel and the problem it solves?
This tests your understanding of lifecycle-aware state preservation. A good answer explains that ViewModels survive configuration changes (like rotation) to hold UI data, separating it from the transient UI controller.

How do you arrange UI elements in Jetpack Compose?
Tests your grasp of Compose's declarative layout model. Explain Row (horizontal) and Column (vertical) as the core layout composables. Define Modifier as the standard way to configure size, spacing, and behavior.
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