Android Interview Questions
ये 41 सवाल 2026 में Android (Kotlin) roles के लिए सबसे ज़्यादा पूछी जाने वाली चीज़ें cover करते हैं। हर जवाब interview में बोलने लायक छोटा है — फिर अपने Student Diary project का example जोड़ें।
- 1हर दिन एक group पढ़ें
- 2हर जवाब 30 seconds से कम में बोलकर देखें
- 3हर जवाब के साथ अपने project का code दिखाएँ
- 4जो feature समझा न सकें, वह छोटा बनाकर देखें
Basics & Kotlin
1. What are the four Android app components?
Activity (screen), Service (बिना UI का background काम), Broadcast Receiver (system events पर react) और Content Provider (दूसरी apps से data share)।
2. What is the AndroidManifest.xml?
App की identity file: package/namespace, icon, Application class, सारे components, intent filters और permissions।
3. minSdk, targetSdk and compileSdk?
minSdk सबसे पुराना supported version, targetSdk वह version जिसके लिए app test/optimise हुई, compileSdk code compile करने वाला SDK।
4. val vs var?
val assign होने के बाद read-only; var दोबारा assign हो सकता है। val को प्राथमिकता दें।
5. How does Kotlin null safety work?
Types default रूप से non-null हैं। Nullable types ? use करते हैं, और उन्हें ?. (safe call), ?: (Elvis), let या !! (force, बचें) से handle करते हैं।
6. What is a data class?
Data रखने वाली class; Kotlin equals, hashCode, toString, copy और componentN functions बना देता है।
7. object vs companion object?
object singleton declare करता है। companion object class से जुड़े members रखता है, Java के static जैसे।
8. What is an APK vs AAB?
APK installable package है। AAB (Android App Bundle) publishing format है; Google Play उससे optimised APKs बनाता है।
Activities, Fragments & UI
9. Explain the Activity lifecycle.
onCreate → onStart → onResume (running) → onPause → onStop → onDestroy, और stopped से लौटने पर onRestart।
10. What happens on screen rotation?
Activity destroy होकर दोबारा बनती है। छोटी state onSaveInstanceState में save करें और data ViewModel में रखें।
11. Why do fragments use viewLifecycleOwner?
Fragment अपने view से ज़्यादा जी सकता है। viewLifecycleOwner से observe करने पर view destroy होते ही updates रुकते हैं, leaks और crashes नहीं होते।
12. Explicit vs implicit intent?
Explicit target class का नाम देता है; implicit action और data बताकर system को app ढूँढने देता है।
13. ConstraintLayout advantages?
Flat view hierarchy (बेहतर performance), constraints से responsive positioning, chains, guidelines, barriers और ratios।
14. dp vs sp?
dp layouts के लिए density-independent size है; sp user के font size के साथ भी scale होता है और text के लिए है।
15. What is View Binding?
Build feature जो हर layout के लिए binding class बनाता है जिसमें views के type-safe, null-safe references होते हैं, findViewById की जगह।
16. Toast vs Snackbar?
Toast simple system message है। Snackbar आपके layout के अंदर Material component है जिसमें Undo जैसा action हो सकता है।
17. How do you support dark mode?
DayNight theme use करें, overrides values-night में रखें, fixed colours की जगह theme attributes use करें, और चाहें तो AppCompatDelegate.setDefaultNightMode call करें।
Lists & Navigation
18. How does RecyclerView recycle views?
Screen भरने लायक ViewHolders ही बनाता है और scroll होने पर उन्हें नए data से फिर bind करता है।
19. What does DiffUtil / ListAdapter do?
पुरानी और नई list का फ़र्क निकालकर सिर्फ़ बदली rows animation के साथ update करता है; आप submitList() call करते हैं।
20. What is the Navigation Component?
Jetpack library जिसमें destinations और actions का navigation graph, NavHostFragment और NavController, साथ में Safe Args और toolbar/drawer integration।
21. How do you connect bottom navigation to navigation?
Menu items को graph destinations जैसी ids दें और bottomNav.setupWithNavController(navController) call करें।
22. What are the parts of a navigation drawer?
DrawerLayout (content + drawer), header और menu वाला NavigationView, और hamburger icon के लिए drawer के साथ AppBarConfiguration।
23. TabLayout with ViewPager2?
ViewPager2 FragmentStateAdapter से pages दिखाता है; TabLayoutMediator tabs और pages जोड़ता है।
24. How do you pass data between fragments?
Navigation arguments (Bundle या Safe Args) या activityViewModels() से shared ViewModel।
Data & Architecture
25. SharedPreferences vs DataStore vs Room?
Preferences/DataStore छोटे key–values रखते हैं (DataStore Flow के साथ async); Room SQLite में structured records रखता है।
26. Main parts of Room?
@Entity (table), @Dao (queries), @Database (database holder, singleton)। Queries compile time पर verify होती हैं।
27. Why return Flow from a DAO?
Table बदलते ही Room नया result emit करता है, इसलिए UI अपने आप update होता है।
28. What is MVVM?
View एक ViewModel observe करता है जो state expose करता है; ViewModel Repository use करता है जो data sources (Model) से बात करता है।
29. Why does ViewModel survive rotation?
यह Activity/Fragment के ViewModelStore में रहता है जो configuration changes में बना रहता है।
30. LiveData vs StateFlow?
LiveData lifecycle-aware observable data है; StateFlow current value वाला Kotlin hot flow है, जिसे repeatOnLifecycle से collect करते हैं।
31. What is a Repository?
एक class जो छिपाती है data कहाँ से आता है (database, network, cache) और ViewModel को एक साफ़ API देती है।
Concurrency, Network & Device
32. What is a coroutine?
एक हल्की, suspend हो सकने वाली computation। suspend functions बिना thread block किए रुक सकते हैं।
33. launch vs async?
launch Job लौटाता है (result नहीं); async Deferred<T> लौटाता है और result await() से मिलता है।
34. Name the main dispatchers.
UI के लिए Main, blocking I/O (files, network libraries) के लिए IO, CPU काम के लिए Default।
35. What is an ANR?
Application Not Responding: main thread बहुत देर block रहा (input के लिए लगभग 5 seconds)।
36. How does Retrofit work?
Annotated methods वाला interface declare करते हैं; Retrofit HTTP calls बनाता है और converter (Gson) JSON को objects में बदलता है। Methods suspend हो सकते हैं।
37. Why use Glide?
यह images download, decode, resize और cache करता है और recycled views की requests cancel करता है।
38. Normal vs dangerous permissions?
Normal install पर मिल जाती हैं (INTERNET)। Dangerous (camera, location, 13+ पर notifications) runtime पर माँगनी पड़ती हैं।
39. Why notification channels?
Android 8 से हर notification एक channel का होता है जिसे user अलग से control कर सकता है।
40. WorkManager vs Service?
WorkManager टाली जा सकने वाली, guaranteed background work चलाता है, app बंद या reboot के बाद भी; foreground Service music जैसा ongoing user-visible काम चलाता है।
41. How do you publish an app?
versionCode बढ़ाएँ, upload key से signed AAB बनाएँ, Play Console में listing, content और data safety पूरी करें, track पर test करें, फिर production में release।
पाँच सवाल चुनकर Student Diary code से किसी दोस्त को समझाइए (जैसे DiffUtil के लिए NoteAdapter और MVVM के लिए NoteViewModel दिखाइए)।
