Naar console

ActivityLifecycleManager

public class ActivityLifecycleManager extends Object

This is a convenience class that wraps the ActivityLifecycleCallbacks registration. It provides an abstract Callbacks class that reduces required boilerplate code in your callbacks as well as OS Version checks that make it compatible with Android versions less than Ice Cream Sandwich.

Nested Class Summary

class ActivityLifecycleManager.Callbacks Override the methods corresponding to the activity. 

Public Constructor Summary

ActivityLifecycleManager(Context context)

Public Method Summary

boolean
void
resetCallbacks()
Unregisters all previously registered callbacks on the application context.

Inherited Method Summary

Public Constructors

public ActivityLifecycleManager (Context context)

Parameters
context Any context object, it is not stored

Public Methods

public boolean registerCallbacks (ActivityLifecycleManager.Callbacks callbacks)

Parameters
callbacks The callbacks
Returns
  • true if the version of the application context supports registering lifecycle callbacks

public void resetCallbacks ()

Unregisters all previously registered callbacks on the application context.