LifecycleService

public class LifecycleService
extends Service implements LifecycleOwner

java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ androidx.lifecycle.LifecycleService


A Service that is also a LifecycleOwner.

Summary

Inherited constants

Public constructors

LifecycleService()

Public methods

Lifecycle getLifecycle()

Returns the Lifecycle of the provider.

IBinder onBind(Intent intent)
void onCreate()
void onDestroy()
void onStart(Intent intent, int startId)
int onStartCommand(Intent intent, int flags, int startId)

Inherited methods

Public constructors

LifecycleService

public LifecycleService ()

Public methods

getLifecycle

public Lifecycle getLifecycle ()

Returns the Lifecycle of the provider.

Returns
Lifecycle The lifecycle of the provider.

onBind

public IBinder onBind (Intent intent)

Parameters
intent Intent

Returns
IBinder

onCreate

public void onCreate ()

onDestroy

public void onDestroy ()

onStart

public void onStart (Intent intent, 
                int startId)

Parameters
intent Intent

startId int

onStartCommand

public int onStartCommand (Intent intent, 
                int flags, 
                int startId)

Parameters
intent Intent

flags int

startId int

Returns
int