Android App Development Interview Questions in Lucknow
36 practice questions with answers for Android App Development interviews in Lucknow.
Android App Development jobs in Lucknow
Lucknow's tech job market is smaller but growing, led by IT-services delivery centres, government-tech projects and start-ups. Many Lucknow candidates target Noida and Gurgaon roles or remote jobs, so interviews follow the NCR pattern.
Below are 36 questions that match the mix of service, product and domain employers hiring junior android developers in Lucknow.
Solved for LucknowStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
✓ 3 questions free • Unlock the rest in seconds
01
Write a unit test for a ViewModel using a fake repository and runTest.
class ProductViewModelTest {
@get:Rule val mainRule = MainDispatcherRule()
@Test
fun loadsProductsIntoState() = runTest {
val fake = FakeProductRepository(listOf(Product("1", "Pen", 10.0)))
val vm = ProductViewModel(fake)
advanceUntilIdle()
val state = vm.state.value
assertFalse(state.loading)
assertEquals(1, state.items.size)
assertNull(state.error)
}
}
02
Write a Room database class with a migration that adds a column.
Dispatchers.Main runs on the Android UI thread and is used for updating views or state. Dispatchers.IO uses a large shared pool, by default up to 64 threads, for blocking work like disk and network. Dispatchers.Default uses a pool sized to CPU cores for CPU-heavy work like sorting, parsing large JSON or image processing. Use withContext to switch, and keep suspend functions main-safe so callers do not need to know.
A value class, declared with @JvmInline value class UserId(val value: String), wraps a single value to give it a distinct type without the runtime cost of an object in most cases, because the compiler unboxes it. It prevents mistakes like passing an OrderId where a UserId is expected. It may get boxed when used as a nullable type, in generics or through interfaces, so the zero-cost benefit is not guaranteed everywhere.
05
Your team wants to migrate a large XML app to Compose. How would you plan it?
Start by setting up a shared Compose theme matching the existing design system, then build new screens in Compose. Migrate leaf components and simple screens next, using ComposeView inside fragments, and leave complex custom views wrapped in AndroidView for later. Measure performance with Macrobenchmark and add Baseline Profiles. Add Compose UI and screenshot tests, train the team, and set a rule that new UI is Compose-only.
On every pull request, run lint, ktlint or detekt, unit tests and a debug build in a CI service like GitHub Actions or Bitrise, with Gradle caching. On merge to main, build a signed release AAB using secrets, run instrumented tests on emulators or a device farm, and upload to the Play internal track with Gradle Play Publisher or fastlane. Promote to production manually after QA with a staged rollout.
07
Users on slow 2G and 3G networks in small towns report the app keeps failing. How do you improve it?
Set reasonable connect and read timeouts, retry idempotent requests with exponential backoff, and cache responses so screens show something offline. Reduce payload size with gzip, pagination and fields filtering, and load images in smaller sizes with placeholders. Show clear offline and retry states instead of generic errors. Test with the emulator network throttling and real devices on poor connections, and track failure rates by network type.
08
How do default and named arguments reduce the need for overloads?
Kotlin functions can define default values, such as fun showToast(msg: String, long: Boolean = false), so callers skip arguments they do not need. Named arguments, like showToast(msg = "Saved", long = true), make calls readable and let you change argument order. Together they replace telescoping constructors and builder patterns in many cases. For Java callers, add @JvmOverloads so overloads are generated automatically.
09
How do you find and fix memory leaks in an Android app?
Add LeakCanary to debug builds; it detects retained Activities, Fragments and ViewModels and shows the reference chain. Common leaks are static or singleton references to Context or Views, listeners not unregistered, inner classes holding Activity references, and Fragment view bindings not cleared in onDestroyView. Fix by using application context, lifecycle-aware components and weak references only where needed. Confirm with Memory Profiler heap dumps.
10
Your app shows duplicate orders when users tap Pay twice on a slow network. How do you fix it?
Disable the button and show progress once tapped, but do not rely only on the UI. Generate an idempotency key on the client for each checkout attempt and send it with the request so the server returns the same result for retries. Ensure the payment call is not retried automatically by OkHttp for non-idempotent POSTs, and let the user check order status if the response is lost.
11
Tell me about a time a bug you introduced reached production. How did you handle it?
Situation: a migration I wrote missed a default value, and some users lost their saved addresses. Task: fix it and regain trust. Action: I told my lead immediately, we paused the rollout, I wrote a correct migration with a test covering upgrades from the last three versions, and we restored data from the server for affected users. Result: impact stayed small, and migration tests became mandatory in our CI.
12
What are extension functions and how are they resolved?
Extension functions let you add functions to an existing class without inheriting from it, for example fun String.isValidEmail(): Boolean. They are resolved statically at compile time based on the declared type of the variable, not the runtime type, so they do not support polymorphism. They cannot access private members of the class. They are used widely in Android KTX libraries, such as Context.toast or View.isVisible.
13
What is Retrofit and how does it work with coroutines?
Retrofit is a type-safe HTTP client that turns an annotated Kotlin interface into API calls. You declare methods with @GET, @POST, @Path, @Query and @Body, and Retrofit generates the implementation using OkHttp underneath. Marking methods as suspend makes them main-safe and cancellable, returning the parsed body directly or Response<T> when you need status codes and headers. A converter like kotlinx.serialization or Moshi parses JSON.
14
Network calls keep running after the user leaves a screen and results arrive late. How do you fix this?
The work is likely launched in GlobalScope, a custom scope never cancelled, or an Application-level scope. Move it to viewModelScope so it is cancelled when the ViewModel is cleared, and make sure the calls are cancellable, which Retrofit suspend functions are. If work must outlive the screen, like uploading a file, move it to WorkManager or an application scope deliberately, and do not update UI from it.
15
Write a stateless text field with a hoisted state and validation message.
Situation: after a release, crash-free users dropped from 99.6 to 97 percent. Task: stop the impact fast. Action: I checked Crashlytics, found a crash on Android 14 caused by a missing foreground service type, paused the staged rollout in Play Console, shipped a hotfix with a test on an emulator for that API level, and wrote a short postmortem. Result: crash rate recovered within a day and we added API-level checks to our release checklist.
17
How do you store sensitive data such as tokens securely on Android?
Never store secrets in plain SharedPreferences or hardcode them in code. Use the Android Keystore to generate a key that never leaves secure hardware, and encrypt the data before storing it in DataStore or a file. The security-crypto EncryptedSharedPreferences library is deprecated, so many teams use Tink with Keystore. Keep tokens short-lived with refresh tokens, and clear them on logout. Exclude them from backups.
18
Explain the steps to publish an app on the Play Store.
Create a developer account, then an app in Play Console. Complete the store listing, content rating, data safety form, target audience, privacy policy and permissions declarations. Build a signed release AAB with a higher versionCode, upload it to internal testing first, then closed or open testing, and finally production with a staged rollout. New personal accounts must run a closed test with at least 12 testers for 14 days before production.
19
You need to cache API responses so the home screen opens instantly. What approach do you take?
Store the response in Room, or a file for a single blob, and have the screen observe the cached data immediately while a refresh runs in the background, known as stale-while-revalidate. Store a timestamp to decide when cache is too old. HTTP caching with OkHttp Cache can also help for GET requests with proper cache headers. Show cached content first, then update smoothly when fresh data arrives.
20
How do you model API results and errors cleanly for the UI?
Map transport-level outcomes into a sealed result type in the data layer, for example Success(data), HttpError(code, message) and NetworkError. Catch IOException for connectivity, HttpException for non-2xx codes, and serialization exceptions for bad payloads, and never catch CancellationException. The ViewModel converts these into user-friendly UiState messages. Keep DTOs separate from domain models so API changes do not ripple through the UI.
21
How do you build a single-activity app with the Navigation component?
Keep one Activity hosting a NavHost, and represent each screen as a Compose destination or Fragment. Define routes in a navigation graph, preferably with type-safe routes using Kotlin serialization in Navigation 2.8 and later. Use nested graphs for flows like login or checkout, pop the back stack with popUpTo when finishing a flow, and handle deep links on destinations. This simplifies shared transitions and state handling.
22
Tell me about a time you disagreed with a designer about a UI decision.
Situation: a designer wanted a custom tiny close icon on a full-screen dialog. Task: keep the app accessible without blocking the design. Action: I showed that the touch target was below the 48dp guideline and that TalkBack had no label, and prototyped the same look with a larger invisible touch area. Result: we kept the visual style, passed accessibility checks, and agreed to review touch targets in future design handoffs.
23
How do LazyColumn keys improve performance and correctness?
By default, items are identified by position, so inserting or deleting an item can make Compose reuse state for the wrong item and recompose more than needed. Supplying key = { it.id } gives each item a stable identity, so remembered state, animations with animateItem and scroll position follow the right item. Also supply contentType for mixed lists so compositions are reused efficiently. Keys must be unique and Bundle-saveable.
24
Write a Hilt module that provides Retrofit and a repository binding.
Situation: our cart total sometimes showed wrong values after quick taps. Task: find the race. Action: I added logs with thread names and found two coroutines updating the same mutable list. I changed state updates to MutableStateFlow.update {}, which is atomic, and added a test with many concurrent updates. Result: the bug disappeared, and I shared a short note with the team on safe state updates so it would not repeat.
28
Compare kotlinx.serialization, Moshi and Gson for JSON parsing.
kotlinx.serialization is Kotlin-first, uses a compiler plugin with no reflection, respects default values and nullability, and works in Kotlin Multiplatform. Moshi supports Kotlin through codegen and is also reliable. Gson uses reflection, ignores Kotlin nullability and default values, and can put null into non-null fields, causing crashes later; it is in maintenance mode. For new Android projects, kotlinx.serialization is the common choice.
29
What is the difference between a started service, bound service and foreground service?
A started service runs after startService until it stops itself. A bound service offers a client-server interface to components that bind to it and stops when all unbind. A foreground service shows a persistent notification and has higher priority, used for music, navigation or ongoing calls. Since Android 14 a foreground service must declare a type such as mediaPlayback or location. For deferrable background work, use WorkManager instead.
30
Users report the app loses form data when they switch to another app and come back after a while. Why?
The system killed the process to reclaim memory while the app was in the background. When the user returns, Android recreates the Activity but ViewModel data is gone because the process died. Fix it by storing small UI state in SavedStateHandle or rememberSaveable, which survive process death, and persisting drafts to Room or DataStore. Test with Don't keep activities or adb shell am kill.
31
What is a ContentProvider and when would you build one?
A ContentProvider exposes data through a URI-based interface with query, insert, update and delete, and handles permissions for cross-app access. You need one when sharing data with other apps, providing search suggestions, or supporting widgets that read your data. FileProvider is a ready-made provider for sharing files securely with content URIs instead of file paths. For data used only inside your app, Room is simpler.
32
What is targetSdkVersion and why does Play enforce updates?
targetSdkVersion tells Android which platform behaviour your app was tested against; the system applies newer behaviour changes only when you target that level. The Play Store requires new apps and updates to target a recent API level, usually within one year of a release, so users benefit from security and privacy changes. minSdk sets the oldest supported version and compileSdk the API you compile against.
33
What are sequences in Kotlin and when are they better than collections?
Sequences evaluate lazily, element by element, while collection operations like map and filter create a new intermediate list at every step. For long chains on large data, or when you only need the first few results with take or first, asSequence() avoids extra allocations. For small lists, plain collections are often faster because sequences add per-element overhead. Measure before switching in performance-critical code.
34
Your team is migrating a Java Android app to Kotlin. How would you plan it?
Kotlin and Java interoperate, so migrate gradually rather than all at once. Start with new features in Kotlin, then convert leaf classes like models and utilities, writing tests before converting. Add nullability annotations to Java code so Kotlin sees correct types. Review auto-converted code because it often overuses !!. Track progress per module and agree on style rules with ktlint or detekt so the codebase stays consistent.
35
The Play Store rejected your update for a policy violation about permissions. What do you do?
Read the rejection email and policy centre message carefully to see which permission or declaration failed, often SMS, call log, background location, all-files access or exact alarms. Remove the permission if a less sensitive alternative exists, such as the SMS Retriever API or photo picker. Otherwise update the permission declaration form with a clear use case and video. Check the merged manifest for permissions added by libraries.
Anything shipped in the APK can be extracted, so treat client-side keys as public. Keep them out of version control using local.properties or CI secrets injected into BuildConfig, restrict them in the provider console by package name and SHA-1, and keep truly secret keys on your backend, which proxies the calls. Use Play Integrity or App Check to reduce abuse from modified apps.
Few big employers listed in Lucknow?
Many Lucknow candidates also apply to teams in Noida and to remote or hybrid roles. Practise the Noida set as well.
Which companies hire Android App Development professionals in Lucknow?
Companies with large offices in Lucknow include many IT services and product firms. Use their company pages below to practise employer-specific sets.
Are Android App Development interviews in Lucknow different from other cities?
The questions depend more on the company than the city. Lucknow's mix of employers decides the style: Many Lucknow candidates target Noida and Gurgaon roles or remote jobs, so interviews follow the NCR pattern
How do I find Android App Development jobs in Lucknow?
Shortlist companies with Lucknow offices, keep your CV focused on Android App Development projects, apply on company career pages and job portals with the Lucknow filter, and practise the questions on this page before each interview.