IntentService

An IntentService is a good candidate for performing scheduled operations that run in the background, independent of an activity. As described in the Android developer reference, IntentService is a base class for services that handle asynchronous requests (expressed as Intents) on demand. Clients send requests through startService (Intent) calls; the service is started as needed and handles each Intent in turn using a worker thread, and stops itself when it runs out of work. You can learn more about IntentService here: https://developer.android.com/reference/android/app/IntentService.html.

Get Kotlin Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.