Q1
Explain the difference between LiveData and StateFlow in Android, and describe a scenario where you would choose one over the other.
Why they ask this:* Tests knowledge of modern reactive programming patterns and whether the candidate understands the evolution of Android architecture components and their practical trade-offs.
Q2
Walk me through how you would implement dependency injection in an Android project. What libraries have you used, and what are the benefits over manual injection?
Why they ask this:* Assesses understanding of architectural best practices, testability, and familiarity with industry-standard tools like Hilt or Dagger that are critical at the mid-level.
Q3
Describe the Activity and Fragment lifecycle in Android. How would you handle configuration changes (like screen rotation) without losing data?
Why they ask this:* Tests foundational Android knowledge and whether the candidate understands common pitfalls and solutions like ViewModel, savedInstanceState, and proper lifecycle management.
Q4
How would you optimize a RecyclerView that is showing a list of 10,000 items and currently has poor scrolling performance?