HomebaseWorks

Android interview questions

Questions commonly asked to check whether you understand how Android manages screens, threads and data.

EWritten by the HomebaseWorks editorial team · reviewed 26 Oct 2026
1
What happens to an Activity during a configuration change, and how do you handle it?

By default the Activity is destroyed and recreated with the new configuration. I keep screen data in a ViewModel, which survives the change, and use saved state for small values that must survive process death too. I avoid blocking rotation in the manifest, because that only hides the problem.

2
What is the difference between onStart and onResume?

onStart means the Activity is visible, and onResume means it is in the foreground and receiving input. A dialog-style Activity on top can pause yours while it stays visible. I start camera previews or sensors in onResume and release them in onPause.

3
Why should a ViewModel not hold a reference to an Activity or View?

The ViewModel lives longer than the Activity, for example across a rotation. Holding the old Activity keeps it and its whole view tree in memory, which is a leak. If I need a Context for something long-lived, I use the application context.

Advertisement
4
How do you keep work off the main thread?

I use Kotlin coroutines, launching from viewModelScope and switching to Dispatchers.IO for network or disk work, or using suspend functions that already do it, like Room's. The main thread only updates the UI. This avoids frozen screens and app-not-responding errors.

5
How does RecyclerView stay smooth with long lists?

It creates only the rows needed to fill the screen and recycles them as the user scrolls, using ViewHolders to keep view references. I keep onBindViewHolder light, load images asynchronously and use ListAdapter with DiffUtil so only changed rows are updated.

6
How does state work in Jetpack Compose?

Composables are functions that redraw when the state they read changes. I hold state with remember and mutableStateOf for UI details, and in a ViewModel for screen data, then pass values down and events up. A plain variable inside a composable does not trigger a redraw, which is a common bug.

Practise out loud. Say each answer once as written, then again in your own words with your own number or story.

Have a number ready. "My Android score is at benchmark on a timed test" is a stronger answer than "I am good at it". Take the test and quote the result.

Advertisement
Continue with Android4 lessons · 1 interview set · 1 test · 1 certificate
Not tested

More in Web and app