Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

LifecycleService

open class LifecycleService : Service, LifecycleOwner
kotlin.Any
   ↳ android.content.Context
   ↳ android.content.ContextWrapper
   ↳ android.app.Service
   ↳ androidx.lifecycle.LifecycleService

A Service that is also a LifecycleOwner.

Summary

Public constructors

A Service that is also a LifecycleOwner.

Public methods
open Int
onStartCommand(@NonNull intent: Intent, flags: Int, startId: Int)

open Unit

open Unit
onStart(@NonNull intent: Intent, startId: Int)

open Lifecycle

open IBinder?
onBind(@NonNull intent: Intent)

open Unit

Public constructors

<init>

LifecycleService()

A Service that is also a LifecycleOwner.

Public methods

onStartCommand

@CallSuper open fun onStartCommand(@NonNull intent: Intent, flags: Int, startId: Int): Int

onCreate

@CallSuper open fun onCreate(): Unit

onStart

@CallSuper open fun onStart(@NonNull intent: Intent, startId: Int): Unit

getLifecycle

@NonNull open fun getLifecycle(): Lifecycle

onBind

@CallSuper @Nullable open fun onBind(@NonNull intent: Intent): IBinder?

onDestroy

@CallSuper open fun onDestroy(): Unit