& user interaction. ◉ Too much process on main thread = lag / froze even forced close. ◉ Solution #1 Background thread = move the processing in background while the app is active. ◉ Solution #2 Background process = move the processing in background even though the app is not active.
API 14). - Uses JobScheduler on API 23+. - Uses a combination of AlarmManager & BroadcastReceiver on API 14-22. - Ensures task execution, even if the app or device restarts.
Constraints. - Chaining. - Manage & monitor scheduled tasks. - Works with or without Play Services. - Adhere to system best practices. - LiveData support.
It consists of OneTimeWorkRequest and PeriodicWorkRequest. You passed in a Worker to create a WorkRequest. You can also set the Constraints or a Delay.