What is IntentService, and why was it deprecated in API 30 in favor of JobIntentService or WorkManager?
- A.D. IntentService was replaced because it cannot handle explicit Intents, only implicit ones
- B.B. IntentService was deprecated because it automatically logs all received Intents to Logcat, creating a privacy risk
- C.C. IntentService is deprecated because it shares its worker thread with the UI thread, causing ANRs
- D.A. IntentService processes Intents on a background thread but cannot run in the foreground, making it incompatible with Android 8+ background execution limits; WorkManager handles scheduling and lifecycle properly
Why D is correct
IntentService queued work on a single HandlerThread and stopped itself when the queue was empty, but Android 8 Oreo's background service restrictions mean apps can no longer start background services from the background. JobIntentService and WorkManager respect Doze, App Standby, and the new restrictions. The other options misrepresent IntentService behavior.
Know someone studying for Mobile Security Fundamentals? Send them this one.