Android lifecycle and app components interview questions
Activities, Fragments, configuration changes, process death, intents, services, receivers and permissions.
– interview-ready · 18 questions in this topic
– of 18 tried
Saved on this device. Interview-ready means you got it right on two different days. Guesses and hints count for less.
Questions
- The Activity lifecycleOrder the steps
- Lifecycle order: A opens BOrder the steps
- Configuration changesPick the fix
- Process deathPredict
- SavedStateHandleFill the blank
- Fragment and view lifecyclesSpot the bug
- How a ViewModel survivesPick the fix
- Launch modes and tasksPredict
- Explicit and implicit intentsPick the fix
- PendingIntent and mutabilityPick the fix
- The Activity Result APIPick the fix
- Services and foreground service typesPick the fix
- Broadcast receiversPick the fix
- Content providersPick the fix
- Runtime permissionsOrder the steps
- Application class and startup workPick the fix
- TransactionTooLargeExceptionPick the fix
- Parcelable vs SerializablePick the fix
Practise this topic
Flashcards · 23
Flip, then say if you knew it. Needs JavaScript; every answer is also on its question page.
Quick quiz · 18 questions
One exercise per question, checked as you go. Needs JavaScript.
Mock interview · 3 sets
Timed, out loud, then tick what you covered. Needs JavaScript.
Fix this PR · 1 review
Review a diff like a senior: flag the lines you'd comment on. Needs JavaScript.
Quick facts
Recall the answer first, then tap Show to check.
onSaveInstanceState timing
On Android 9 (API 28) and later, onSaveInstanceState runs after onStop.
Exported components
Since Android 12, every component with an intent filter must set android:exported.
Package visibility
Since Android 11, apps see only some other apps by default; declare <queries> for the intents you check.
Notification permission
POST_NOTIFICATIONS became a runtime permission in Android 13 (API 33).
Foreground service types
Android 14 requires each foreground service to declare a type, such as location or mediaPlayback.
Printable cheat sheet · Review your weak spots in this topic
Share your progress
Sources: Question outline adapted from Android-Interview-Questions by Mohsen Mirhoseini, licensed under Apache 2.0. We reorganised the questions, rewrote every answer and added new ones. Credits and license