Mobile · Fresher-relevant
Android development interview questions on Activity/Fragment lifecycle, Jetpack components, RecyclerView, and Kotlin coroutines.
What are the four main components of an Android application?
Tip: Activity (UI screen), Service (background work), BroadcastReceiver (system/app events), and ContentProvider (shared data). Each is declared in AndroidManifest.xml — interviewers map scenarios to the right component.
Explain the Android Activity lifecycle. When is onStop called vs onPause?
Tip: onPause runs when the activity is partially obscured; onStop when it is fully hidden; onDestroy when it is torn down. Persist fragile UI state in onPause because onStop is not guaranteed on low-memory kills.
What is the difference between Fragment and Activity?
Tip: Activity is a standalone screen entry point. Fragment is a reusable UI module hosted inside an Activity — ideal for adaptive layouts and Navigation Component graphs.
What are Jetpack components? Name and explain three commonly used ones.
Tip: ViewModel survives configuration changes; Room is a type-safe SQLite layer; Navigation Component handles fragment transactions declaratively. LiveData/StateFlow expose lifecycle-aware streams to the UI.
What are Kotlin coroutines? How do they differ from threads?
Tip: Coroutines suspend cooperatively without blocking a thread — many coroutines can share one thread. Use viewModelScope.launch with Dispatchers.IO for network/DB and Dispatchers.Main for UI updates.
What is RecyclerView and how does the ViewHolder pattern help performance?
Tip: RecyclerView recycles item views as rows scroll off-screen. ViewHolder caches findViewById lookups so binding work happens once per row type, not on every scroll frame.
What is MVVM on Android and why do teams adopt it?
Tip: MVVM separates UI (Activity/Fragment/Compose) from ViewModel state and Repository data access. It improves testability, survives rotation via ViewModel scope, and keeps networking off the main thread.
How do you ensure backward compatibility across Android API levels?
Tip: Use AndroidX for backported APIs, guard newer APIs with SDK_INT checks or @RequiresApi, set a realistic minSdk, and test emulators at min and target SDK. Runtime permissions matter from API 23 onward.
InterviewEra generates role-specific questions using your actual projects and skills. Get scored feedback on technical depth, clarity, and structure — free to start.