- Kotlin
- Android
- Lifecycle
- Networking
- Webview
- Dependency Injection
- Jetpack Compose
- Thread
- Architecture
- System Design
- Libraries
- Common Question
- Questions from Company
- What is the difference between
const val
andval
? - What is so interesting about
data class
? - Is singleton thread-safe? vs Object?
- What are different type of scope modifiers?
- What are different Coroutine Scope?
- How to manage series and parallel execution?
- Difference between Flow/SharedFlow/StateFlow and elaborate it.
- What happens if we call
.cancel()
from a coroutine scope? - What is an Init block in Kotlin?
- How to choose between apply and with?
- What is inline function in Kotlin?
- Difference between Coroutine and Java Thread
- Why Coroutines are light weight?
- How does Coroutine switch context?
- How does Garbage collection works?
- What is a dangling pointer?
- Elaborate Memory Leak?
- Explain fragment Lifecycle when it comes to ViewPager and sliding between different fragments.
- Difference between FragmentStateAdapter and FragmentStatePagerAdapter.
- Difference between Serializable and Parcelable? What are the disadvantages of Serializable?
- How you could implement observable SharedPrefs or observable Databases i.e. Observe a certain key/table/query?
- How does layout inflation work from xml tags to view reference in memory?
- What is a Thread, Handler, Looper and Message Queue?
- What are the different methods of concurrency on Android? Can you explain the difference between ExecutorService vs CachedThreadPool vs FixedThreadPool vs AsyncTasks vs HandlerThreads?
- How does
ViewModel
instance provided to Activity and Fragment. How doesViewModelProviderStore
decide when to retain the instance? - How do you inspect and solve Jank issue? here
- How does the OutOfMemory happens?
- How do you find memory leaks in Android applications?
- What is Doze? What about App Standby?
- What does
setContentView
do? - Process of creating a custom view
- Deeplink understanding and architecture
- Notifications
- How to keep a video maintain playing state when we rotate screen?
- How many callbacks in Fragmnets?
- What could be the reasons when
onPause
didn't get triggered? - What kind of events trigger
onPause()
to run? - In what scenario does the "onDestory" get called directly after "onCreate"?
- Which callback gets called on Activity when an AlertDialog is shown?
- What's the lifecycle in PIP (Picture-in-Picture)?
- What happens if you rotate the device?
- Inside a viewpager (Fragment state pager adapter) what will be the lifecycle of the fragments when you swap from tab to another ?
- Why onActivityCreated is now depreciated in Fragment?
- Which callback should i use if i want to know when my activity came to foreground?
- When is onActivityResult called?
- What does setRetainInstance do and how you can avoid it?
- What callbacks trigger when a Dialog opens up? Conside both case, dialog attached from same activity/fragment and other activity/fragment.
- What does
launchWhenCreated
,launchWhenStarted
, andlaunchWhenResumed
functions do?
- What is the role of OkHttp and Retrofit?
- What design pattern does Retrofit use?
- How would optimise handling of access token expiration? How would you handle retry network call when the api fails? (Custom Interceptor response)
- What are the problems around security when dealing with
WebView
. - How to interact or make connections with JavaScript?
- Provides vs binds
- Subcomponent vs component dependency, what is the difference under the hood
- What is subcomponent and what is the use? How do you use qualifiers or how would you provide different instances of a class with the same data type? Constructor Injection V/s Method Injection? What is the scope? Singleton Annotation?
- What is Circular dependency in dagger?, and how to resolve it
- What's interesting about Hilt?
- Did you use Koin? What are your thoughts on it?
- How to launch coroutine from a composable function? - LaunchedEffect
- How to launch coroutine from a non-composable function, but tied to composition? - rememberCoroutineScope()
- What is recomposition? Recomposition
- What is
remember
in compose?- A composable function to remember the value produced by a calculation only at the time of composition. It will not calculate again in recomposition.
- Recomposition will always return the value produced by composition.
- Whole Compose is based on concept of
Positional Memoization
- At the time of recomosition,
remember
internally calls a function calledrememberedValue()
whose work is to look into theslotTable
and compare if the previous value and the new value has any difference, if not return, else update value
- Why and when to use
remember {}
? - Difference between
LazyColumn
andRecyclerView
? - What is AndroidView in compose?
- What is the lifecycle of composeables? Lifecycle
- How to avoid recomposition of any composable, if the state is not changed? Smart Recomposition
- What are stable types which can skip recomposition?
- What is State?
- What is MutableState and how does recomposition happens?
- How to retain State accross recomposition and configuration changes?
- Difference between Stateless and Statefull composeables?
- What are your thoughts on flat heirarchy, constraint Layout in compose vs the older view heirarchy in xml
- Difference b/w remember and LaunchedEffect
- Does re-composition of
ComposeItem1
bring any affect onComposeItem2
? If yes, then how?ComposeParent() { ComposeItem1 {} ComposeItem2() {...} }
- What is
CompositionLocal
?
- Custom views in compose
- Canvas in Compose
- Different type of threads?
- Difference between different type of thread?
- Thread <-> Handler <-> looper
- UI vs Background Thread
- What is SOLID principles?
- What is MVVM?
- Brief about Android Architecture.
- Design Image Loading Library
- Design Image Downloading Library
- Design LRU Cache
- Design a real-time Twitter feed timeline. How will you structure the backend? Will you use WebSocket or REST for this use case? Justify.
- Design Networking Library
- Design Checkout Screen
- Design Error handling Structure
- REST <-> Web Sockets
- Implement caching mechanism
- How Glide internally works?
- Hoe does retrofit workss internally?
- ViewModel internal working
String
vsStringBuilder
==
vs.equals
?===
vs==
?- Java OOP concepts
Company | Questions |
---|---|
Booking.com |
|
Spotify |
|
PhonePe |
|
Paytm |
|
Meesho |
|
What interesting questions you had faced while giving interview for Android Engineer role (any level)? Let's open a PR.