Background Processing Interview Questions (Android Native)
5 Background Processing questions from the Android Native track. Read each short answer here, then open a question for the full explanation, examples, common mistakes, and sources.
- Junior
What are the types of services in Android and what is the essential difference between them?
Three types: a foreground service that shows a persistent notification to the user for noticeable tasks, a background service for invisible tasks, and a bound service that attaches to a component through a communication interface.
Read the full explanation - Mid-level
What is the architecture of WorkManager and why is it considered the recommended solution for guaranteed and deferred tasks?
It is a library for managing tasks guaranteed to execute even if the app is closed or the device is restarted, with the ability to tie them to constraints such as internet connectivity or charging.
Read the full explanation - Mid-level
What is the difference between OneTimeWorkRequest and PeriodicWorkRequest and what is the minimum interval?
OneTimeWorkRequest runs the task only once, while PeriodicWorkRequest runs it periodically and repeatedly, and the minimum interval is 15 minutes to save power.
Read the full explanation - Mid-level
What are the strict requirements for running a foreground service on modern Android versions (Android 14+)?
You must declare a specific service type (foregroundServiceType) in the manifest, request its specific permission, and launch a persistent notification visible to the user through startForeground within a few seconds.
Read the full explanation - Senior
How does the Android system manage power consumption through Doze mode and App Standby and what is their effect on background tasks?
Doze mode suspends apps' access to the network, wake locks, and periodic sync when the device is idle with its screen off; App Standby restricts apps the user has not opened for a long time.
Read the full explanation