Skip to content
tezvyn:

Android & Kotlin

Jetpack Compose, Android Studio, Kotlin, Material You

194 bites

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

Intermediate everything in Android & Kotlin, page 2

How do you diagnose and optimize a slow Room query?
intermediate2 min read

How do you diagnose and optimize a slow Room query?

Tests SQLite profiling and Room optimization. Isolate the query with Database Inspector, run EXPLAIN QUERY PLAN to spot scans, then add covering indexes, rewrite joins, or use Paging3. Red flag: blindly adding indexes or switching to NoSQL without measuring.

Explain touch event dispatch in a ViewGroup with a clickable child
intermediate2 min read

Explain touch event dispatch in a ViewGroup with a clickable child

It tests touch routing through the three key methods. A strong answer traces ACTION_DOWN from root to target, notes intercepting halts child delivery, and onTouchEvent true consumes while false bubbles up.

How do include, merge, and ViewStub optimize deep layout nesting?
intermediate2 min read

How do include, merge, and ViewStub optimize deep layout nesting?

This tests Android view inflation and hierarchy flattening. A strong answer covers include for reuse, merge to strip redundant parents during inflation, and ViewStub for lazy-loading heavy views. A red flag is conflating them or citing XML brevity alone.

What are RecyclerView.Adapter and ViewHolder, and why do they improve scrolling?
intermediate2 min read

What are RecyclerView.Adapter and ViewHolder, and why do they improve scrolling?

This tests RecyclerView's data-to-view separation. A strong answer says Adapter binds data while ViewHolder caches findViewById results, avoiding hierarchy scans on scroll. A red flag is calling ViewHolder a memory saver instead of a lookup cache.

Functional difference between @Binds and @Provides in Hilt
intermediate2 min read

Functional difference between @Binds and @Provides in Hilt

Tests if you understand Hilt code generation tradeoffs. @Binds wires an existing injectable implementation to an interface with less overhead; @Provides constructs instances manually.

intermediate2 min read

Explain Retrofit Interceptors and write a static API key interceptor

Tests OkHttp interception and application versus network scope. Strong answers build a new request adding X-Api-Key via newBuilder and chain.proceed; contrast addInterceptor once versus addNetworkInterceptor per hop.

How does a ViewModel survive configuration changes and what is its scope?
intermediate2 min read

How does a ViewModel survive configuration changes and what is its scope?

The framework retains ViewModels in a store scoped to an Activity or Fragment across config changes, clearing them only when the owner finishes for good.

intermediate2 min read

Describe staged rollout on Google Play Console, benefits, and metrics to monitor

Tests release engineering and risk mitigation. Covers: set percentage and countries, manually ramp, halt on bad signals; benefits are blast-radius reduction and real-world validation. Flag: auto-ramping claims or ignoring halted users keep the bad build.

Google Play App Signing: upload key versus app signing key
intermediate2 min read

Google Play App Signing: upload key versus app signing key

Tests Android signing infrastructure and key escrow knowledge. A strong answer states Google holds the app signing key while you retain an upload key, protecting critical signing material. Red flag: claiming both keys sign the final install artifact.

Release build ClassNotFoundException not in debug: cause and file?
intermediate2 min read

Release build ClassNotFoundException not in debug: cause and file?

Tests R8 shrinking awareness: release-only obfuscation removes classes loaded by reflection. Check proguard-rules.pro first and add a -keep rule. Red flag: blaming multidex or disabling minification rather than writing a targeted keep rule.

What is certificate pinning and what are its trade-offs?
intermediate2 min read

What is certificate pinning and what are its trade-offs?

Pinning hardcodes a server key to block rogue CA MITM; trade-offs are breakage on cert rotation and forced updates.

Explain cold, warm, and hot app startups and three cold-start optimizations
intermediate2 min read

Explain cold, warm, and hot app startups and three cold-start optimizations

Cold means no process; warm means process lives but activity recreates; hot means activity resumes. Three fixes: lazy-load deps, trim Application.onCreate, defer blocking I/O.

Diagnose Android UI jank using Android Studio's Profiler
intermediate2 min read

Diagnose Android UI jank using Android Studio's Profiler

Start with CPU Profiler for traces over 16ms and main thread blocking; check Memory Profiler for GC.

How do you test a Compose click and verify state change?
intermediate2 min read

How do you test a Compose click and verify state change?

This tests Compose semantics and interaction-to-assertion flow. Mention ComposeTestRule, onNodeWithTag, performClick, and assert on the changed node with assertIsDisplayed or assertTextEquals.

Mock vs Fake test doubles: when to use a Fake Repository?
intermediate2 min read

Mock vs Fake test doubles: when to use a Fake Repository?

Tests if you know a Fake is a working lightweight implementation while a Mock verifies interactions. Good answers define Fake as in-memory with real logic, Mock as expectation-based, and choose a Repository Fake when many tests need reusable state.

Explain integration tests and isolate Room DAO tests
intermediate2 min read

Explain integration tests and isolate Room DAO tests

Tests integration vs unit testing and Room isolation. Outline: verify real DAO-to-DB interaction with Room.inMemoryDatabaseBuilder; reset state by closing and recreating the DB in @After. Red flag: mocking the DAO or using an on-disk database.

Unit test a ViewModel exposing StateFlow in a local JVM test
intermediate2 min read

Unit test a ViewModel exposing StateFlow in a local JVM test

Tests coroutine hygiene and flow collection strategy. A strong answer covers injecting a TestDispatcher, using runTest, collecting emissions in a background scope, and asserting states.

Explain Structured Concurrency in Kotlin Coroutines
intermediate2 min read

Explain Structured Concurrency in Kotlin Coroutines

Structured concurrency binds coroutines to a scope; parent cancellation propagates to all children, preventing leaks.

How would you access a Hilt dependency in a non-injectable ContentProvider?
intermediate2 min read

How would you access a Hilt dependency in a non-injectable ContentProvider?

Tests Hilt's escape hatch for framework classes. Strong answer: define an EntryPoint in SingletonComponent, expose the dependency, and retrieve it with EntryPointAccessors.fromApplication. Red flag: field injection or manual static singletons.

How do you inject two different OkHttpClient instances with Hilt?
intermediate2 min read

How do you inject two different OkHttpClient instances with Hilt?

Tests Hilt qualifiers for same-type bindings. Answer: define a custom @Qualifier (or @Named), annotate two @Provides methods and the injection site. Red flag: manual client creation or subclassing OkHttpClient instead of qualifying the binding.

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