00

Guide

ANDROID INTERVIEW Qs

Technical questions and model answers for interviewing Android developers. Covers Activity/Fragment lifecycle, Jetpack Compose, Kotlin Coroutines, Room, WorkManager, and performance optimization.

Last updated: May 2026

01

Explain the differences between Activity and Fragment lifecycle

Activity has onCreate, onStart, onResume, onPause, onStop, onDestroy as the main screen unit of an app. Fragment depends on an Activity and has onAttach, onCreate, onCreateView, onViewCreated, onStart, onResume, onPause, onStop, onDestroyView, onDestroy, onDetach. Fragments excel at UI reuse and modularization, and are widely used with ViewPager and Jetpack Navigation.

02

What's the difference between Jetpack Compose and traditional XML layouts?

Jetpack Compose is a declarative UI toolkit where you write UI in Kotlin code. XML layouts are imperative and require findViewById or Data Binding. Compose offers preview support, state-driven recompositions, and flexible styling via Modifiers. Google recommends Compose for new projects, and the traditional View system is in maintenance mode.

03

How do you use Kotlin Coroutines on Android?

Launch coroutines from ViewModelScope or LifecycleScope to run async work without blocking the main thread. Use Dispatchers.IO for network/DB work and Dispatchers.Main for UI updates. Flow enables automatic collection tied to the lifecycle via repeatOnLifecycle, preventing memory leaks.

04

Explain the difference between Room and Realm

Room is an abstraction layer over SQLite and an official Google Jetpack library. It is SQL-based with clear migrations and strong integration with LiveData and Flow. Realm is a mobile-first NoSQL database that persists objects directly with high performance, but community support is declining, and Room is recommended for new projects.

05

What are the use cases and benefits of WorkManager?

WorkManager is a Jetpack library for guaranteed background work that survives device reboots. You can set constraints like network availability, charging state, and delayed execution, supporting both OneTimeWorkRequest and PeriodicWorkRequest. It handles Doze mode and App Standby, enabling reliable background job execution.

06

How do you optimize Android app performance?

Optimize list rendering with RecyclerView and ViewHolder patterns, use weak references and lifecycle-aware components to avoid memory leaks, reduce image memory with Bitmap inSampleSize, detect main-thread violations with StrictMode, shrink code with ProGuard/R8, and improve startup time with Baseline Profiles.

07

Contact

Looking for an Android Developer?

I can support your technical interviews, advise on hiring, or join directly as your Android engineer.

Android Developer Interview Questions | Code Your Reality