Free tutorials & notes in Hindi & English · Clean code examples 🧰 Free PDF & Image Tools →
🏆 Complete App & Publish  ·  Lesson 43

Android Interview Questions

These 41 questions cover what interviewers ask most for Android (Kotlin) roles in 2026. Each answer is short enough to say in an interview — then add an example from your Student Diary project.

  1. 1Read one group per day
  2. 2Say each answer aloud in under 30 seconds
  3. 3Back each answer with code from your project
  4. 4Build one small feature you could not explain
How to prepare

Basics & Kotlin

1. What are the four Android app components?

Activity (a screen), Service (background work without UI), Broadcast Receiver (reacts to system events) and Content Provider (shares data with other apps).

2. What is the AndroidManifest.xml?

The app's identity file: package/namespace, icon, Application class, all components, intent filters and permissions.

3. minSdk, targetSdk and compileSdk?

minSdk is the oldest supported version, targetSdk is the version the app is tested and optimised for, compileSdk is the SDK used to compile the code.

4. val vs var?

val is read-only after assignment; var can be reassigned. Prefer val.

5. How does Kotlin null safety work?

Types are non-null by default. Nullable types use ?, and you handle them with ?. (safe call), ?: (Elvis), let or !! (force, avoid).

6. What is a data class?

A class for holding data; Kotlin generates equals, hashCode, toString, copy and componentN functions.

7. object vs companion object?

object declares a singleton. A companion object holds members tied to a class, similar to static in Java.

8. What is an APK vs AAB?

APK is the installable package. AAB (Android App Bundle) is the publishing format; Google Play generates optimised APKs from it.

Activities, Fragments & UI

9. Explain the Activity lifecycle.

onCreate → onStart → onResume (running) → onPause → onStop → onDestroy, with onRestart when returning from stopped.

10. What happens on screen rotation?

The Activity is destroyed and recreated. Save small state in onSaveInstanceState and keep data in a ViewModel.

11. Why do fragments use viewLifecycleOwner?

A fragment can outlive its view. Observing with viewLifecycleOwner stops updates when the view is destroyed, preventing leaks and crashes.

12. Explicit vs implicit intent?

Explicit names the target class; implicit describes an action and data and lets the system find an app.

13. ConstraintLayout advantages?

Flat view hierarchy (better performance), responsive positioning with constraints, chains, guidelines, barriers and ratios.

14. dp vs sp?

dp is density-independent size for layouts; sp also scales with the user's font size and is used for text.

15. What is View Binding?

A build feature that generates a binding class per layout with type-safe, null-safe references to views, replacing findViewById.

16. Toast vs Snackbar?

Toast is a simple system message. Snackbar is a Material component inside your layout that can have an action like Undo.

17. How do you support dark mode?

Use a DayNight theme, put overrides in values-night, use theme attributes instead of fixed colours, and optionally call AppCompatDelegate.setDefaultNightMode.

Lists & Navigation

18. How does RecyclerView recycle views?

It creates only enough ViewHolders to fill the screen and rebinds them with new data as they scroll off and back on.

19. What does DiffUtil / ListAdapter do?

Computes the difference between old and new lists and updates only changed rows with animations; you call submitList().

20. What is the Navigation Component?

A Jetpack library with a navigation graph of destinations and actions, a NavHostFragment and NavController, plus Safe Args and toolbar/drawer integration.

21. How do you connect bottom navigation to navigation?

Give menu items the same ids as graph destinations and call bottomNav.setupWithNavController(navController).

22. What are the parts of a navigation drawer?

DrawerLayout (content + drawer), NavigationView with header and menu, and AppBarConfiguration with the drawer for the hamburger icon.

23. TabLayout with ViewPager2?

ViewPager2 shows pages from a FragmentStateAdapter; TabLayoutMediator links tabs and pages.

24. How do you pass data between fragments?

Navigation arguments (Bundle or Safe Args) or a shared ViewModel via activityViewModels().

Data & Architecture

25. SharedPreferences vs DataStore vs Room?

Preferences/DataStore store small key–values (DataStore is async with Flow); Room stores structured records in SQLite.

26. Main parts of Room?

@Entity (table), @Dao (queries), @Database (database holder, singleton). Queries are verified at compile time.

27. Why return Flow from a DAO?

Room emits a new result whenever the table changes, so the UI updates automatically.

28. What is MVVM?

View observes a ViewModel that exposes state; the ViewModel uses a Repository that talks to data sources (Model).

29. Why does ViewModel survive rotation?

It is stored in a ViewModelStore owned by the Activity/Fragment that is retained across configuration changes.

30. LiveData vs StateFlow?

LiveData is lifecycle-aware observable data; StateFlow is a Kotlin hot flow with a current value, collected with repeatOnLifecycle.

31. What is a Repository?

A class that hides where data comes from (database, network, cache) and gives the ViewModel one clean API.

Concurrency, Network & Device

32. What is a coroutine?

A lightweight, suspendable computation. suspend functions can pause without blocking a thread.

33. launch vs async?

launch returns a Job (no result); async returns Deferred<T> and you get the result with await().

34. Name the main dispatchers.

Main for UI, IO for blocking I/O (files, network libraries), Default for CPU work.

35. What is an ANR?

Application Not Responding: the main thread was blocked too long (about 5 seconds for input).

36. How does Retrofit work?

You declare an interface with annotated methods; Retrofit generates the HTTP calls and a converter (Gson) maps JSON to objects. Methods can be suspend.

37. Why use Glide?

It downloads, decodes, resizes and caches images and cancels requests for recycled views.

38. Normal vs dangerous permissions?

Normal ones are granted at install (INTERNET). Dangerous ones (camera, location, notifications on 13+) must be requested at runtime.

39. Why notification channels?

From Android 8, every notification belongs to a channel the user can control separately.

40. WorkManager vs Service?

WorkManager runs deferrable, guaranteed background work even after app close or reboot; a foreground Service runs ongoing user-visible work like music.

41. How do you publish an app?

Increase versionCode, build a signed AAB with an upload key, complete Play Console listing, content and data safety, test on a track, then release to production.

✅ Practice

Pick five questions and explain them to a friend using the Student Diary code (for example, show NoteAdapter for DiffUtil and NoteViewModel for MVVM).

Frequently Asked Questions

Explain the Activity lifecycle.
onCreate → onStart → onResume (running) → onPause → onStop → onDestroy, with onRestart when returning from stopped.
What happens on screen rotation?
The Activity is destroyed and recreated. Save small state in onSaveInstanceState and keep data in a ViewModel.
SharedPreferences vs DataStore vs Room?
Preferences/DataStore store small key–values (DataStore is async with Flow); Room stores structured records in SQLite.
Main parts of Room?
@Entity (table), @Dao (queries), @Database (database holder, singleton). Queries are verified at compile time.
← Android Tutorial (Kotlin)
🔗

Share this topic with a friend

यह topic किसी दोस्त को भेजें

Found it useful? Send it to a classmate learning the same thing.

अच्छा लगा? जो दोस्त यही सीख रहा है, उसे भेज दीजिए।

Course complete! Continue withE-commerce App (Android + PHP) Your progress: 43 / 43 (100%) · Recommended next course Continue →

How was this lesson?

Your feedback helps us make the content better.

Write a review or suggestion (optional)

After approval, your name and city may appear publicly with your review. Please do not write your email or phone number.

▶ CodingEasily on YouTube

Learn with video lessons in easy Hindi

Featured video: RDBMS Part 3 – Class XI Commerce IT

▶ Subscribe – it’s free