Mobile App Developer
Android and Kotlin questions
188 questions on Android and Kotlin for mobile app developers, easiest first.
Easy 53
- Android activity start ordereasy
- Kotlin Elvis operatoreasy
- Kotlin val with a mutable listeasy
- Kotlin data class equalityeasy
- Compose modifier ordereasy
- What AndroidManifest.xml is foreasy
- Sharing text to any appeasy
- launch vs async in coroutineseasy
- Play Console rejects the build versioneasy
- Dart null-aware operatorseasy
- lateinit or by lazyeasy
- A chain of safe callseasy
- What !! does on nulleasy
- What let returnseasy
- Configuring an object with applyeasy
- object declarationeasy
- Where to put a factory functioneasy
- == versus === in Kotlineasy
- A click callback typeeasy
- What suspend meanseasy
- Sorting 2 lakh itemseasy
- Reading a file with withContexteasy
- delay versus Thread.sleepeasy
- Two suspend calls in a roweasy
- A Flow that never runseasy
- One request per keystrokeeasy
- Launching in GlobalScopeeasy
- Making a composable reusableeasy
- Counter jumps back to zeroeasy
- Showing 5,000 orderseasy
- Two buttons sharing a roweasy
- Getting a repository into a ViewModeleasy
- Room as the source of trutheasy
- State down, events upeasy
- Auto-incrementing IDs in Roomeasy
- Room query in onCreateeasy
- Replacing SharedPreferenceseasy
- Opening your own settings screeneasy
- App Not Responding dialogeasy
- NetworkOnMainThreadExceptioneasy
- Sync every 5 minuteseasy
- Letting users pick a photoeasy
- Colours from the user’s wallpapereasy
- Smoothly expanding a cardeasy
- onPause versus onStopeasy
- Margins that work in RTLeasy
- Splash screens on Android 12 and latereasy
- Runtime permissions on Androideasy
- Google Play Data safety sectioneasy
- Blocking screenshots of sensitive screenseasy
- Copying a one-time passwordeasy
- Google Play release trackseasy
- viewDidLoad vs viewWillAppeareasy
Medium 75
- Surviving screen rotationmedium
- remember vs rememberSaveablemedium
- Reliable background uploadmedium
- Exposing UI state from a ViewModelmedium
- LaunchedEffect keyed on Unitmedium
- collectAsStateWithLifecycle benefitmedium
- viewModelScope after the screen closesmedium
- Blocking file read in a coroutinemedium
- Room DAO returning a Flowmedium
- Room version bump without migrationmedium
- Notifications missing on Android 13medium
- Unit testing a ViewModelmedium
- Release build breaks JSON parsingmedium
- also compared with applymedium
- Adding a subclass to a sealed typemedium
- Modelling loading and errormedium
- When const val is allowedmedium
- Changing a copied data classmedium
- How many times map runsmedium
- Smart cast refusedmedium
- Thread safety of by lazymedium
- Reacting to property changesmedium
- When coroutineScope returnsmedium
- One widget load failsmedium
- Time for two async callsmedium
- Giving up after 3 secondsmedium
- StateFlow did not emitmedium
- Snackbar shows again after rotationmedium
- Stale search resultsmedium
- When combine first emitsmedium
- Channel vs SharedFlowmedium
- Speeding up a slow collectormedium
- Adding to a list in statemedium
- Value stuck after the id changesmedium
- Mixed item types in a LazyColumnmedium
- Cleaning up a sensor listenermedium
- Launching from a click handlermedium
- Passing a value deep without parametersmedium
- Content hidden under the top barmedium
- Passing an order to the detail screenmedium
- Type-safe routes in Navigation Composemedium
- Choosing a Hilt scopemedium
- Do you need use casesmedium
- Keeping a search query after process deathmedium
- Adding a token to every requestmedium
- Sync scheduled twicemedium
- User denied the camera oncemedium
- Counting build variantsmedium
- Activity stored in a ViewModelmedium
- Analytics logged dozens of timesmedium
- Sharing a PDF with another appmedium
- Clicking a button in a Compose testmedium
- Sharing code with iOSmedium
- Checking app integritymedium
- Handling the Android back buttonmedium
- What a ViewModel survivesmedium
- State hoisting in Jetpack Composemedium
- What triggers an ANRmedium
- Layouts for tablets and foldablesmedium
- Converting dp to pixelsmedium
- Room query on the main threadmedium
- Why move to DataStoremedium
- Which app process is killed firstmedium
- Background jobs delayed for some usersmedium
- Explaining why after a denialmedium
- User grants only approximate locationmedium
- Choosing a profile photo on Androidmedium
- Cleartext HTTP fails on Androidmedium
- Trusting a debug proxy only in debugmedium
- What R8 obfuscation gives youmedium
- Sensitive data in device backupsmedium
- Play target API requirementmedium
- Obfuscated Android crash tracesmedium
- Data loaded again and againmedium
- Saving a draft when the app leavesmedium
Hard 60
- Testing process deathhard
- Too many recompositionshard
- Slow cold starthard
- Collecting a cold Flow twicehard
- Polling loop that ignores cancellationhard
- One failing request in coroutineScopehard
- derivedStateOf for a scroll buttonhard
- Wrong row expanded after inserthard
- Stale callback in a long effecthard
- PendingIntent crash on Android 12hard
- Foreground service fails on Android 14hard
- Exported activity loading any URLhard
- FCM handler skipped in backgroundhard
- Extension on a subclasshard
- Property declared in the class bodyhard
- Data class holding an arrayhard
- Checking a generic type at runtimehard
- return inside forEachhard
- Assigning list typeshard
- Mixing up two Long IDshard
- Why viewModelScope uses Main.immediatehard
- Handler on a child coroutinehard
- Suspending in finally after cancelhard
- Why WhileSubscribed(5000)hard
- Where flowOn applieshard
- Exception inside collecthard
- Locking around a suspend callhard
- Child list never skipshard
- Back goes to the login screenhard
- Loading orders with their itemshard
- Two DataStores for one filehard
- Refreshing an expired tokenhard
- Notification opens with old datahard
- App Links fail from Play Storehard
- Content under the status barhard
- Back handler stopped workinghard
- Testing a 30-second retryhard
- Decryption fails after new fingerprinthard
- Recomposing on every scroll pixelhard
- Manifest receiver never fireshard
- Observer called twice after backhard
- ViewModel needs a runtime IDhard
- Collecting a Flow in a Fragmenthard
- Using SavedStateHandlehard
- Speeding up first launch on Androidhard
- Duplicate screens from notification tapshard
- Toolbar under the status bar on Android 15hard
- Periodic sync every 5 minuteshard
- Changing a channel's importancehard
- Alarm app on Android 14hard
- Requesting background locationhard
- Gallery app on Android 13hard
- Exposing native code to a WebViewhard
- Attacker installs a CA certificatehard
- Overlay tricks the user into tappinghard
- Lost the Android upload keyhard
- Play vitals thresholdshard
- Shrinking the install with feature moduleshard
- New Play developer account cannot publishhard
- Raising the minimum OS versionhard