added in version 1.1.0
belongs to Maven artifact android.arch.lifecycle:extensions:1.1.1

LifecycleService

public class LifecycleService
extends Service implements LifecycleOwner

java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ android.arch.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

added in version 1.1.0
LifecycleService ()

Public methods

getLifecycle

added in version 1.1.0
Lifecycle getLifecycle ()

Returns the Lifecycle of the provider.

Returns
Lifecycle The lifecycle of the provider.

onBind

added in version 1.1.0
IBinder onBind (Intent intent)

Parameters
intent Intent

Returns
IBinder

onCreate

void onCreate ()

onDestroy

void onDestroy ()

onStart

added in version 1.1.0
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