belongs to Maven artifact androidx.lifecycle:lifecycle-service:2.0.0-alpha1

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

LifecycleService ()

Public methods

getLifecycle

Lifecycle getLifecycle ()

Returns the Lifecycle of the provider.

Returns
Lifecycle The lifecycle of the provider.

onBind

IBinder onBind (Intent intent)

Parameters
intent Intent

Returns
IBinder

onCreate

void onCreate ()

onDestroy

void onDestroy ()

onStart

void onStart (Intent intent, 
                int startId)

Parameters
intent Intent

startId int

onStartCommand

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

Parameters
intent Intent

flags int

startId int

Returns
int