Summary: Methods | Inherited Methods | [Expand All]

# ApplicationLifecycleMonitorRegistry

`public final class ApplicationLifecycleMonitorRegistry`
`extends Object` ``

java.lang.Object
↳ | android.support.test.runner.lifecycle.ApplicationLifecycleMonitorRegistry

An exposed registry instance to make it easy for callers to find the application lifecycle monitor for their application.

## Summary

### Public methods
`static ApplicationLifecycleMonitor` | `getInstance()` Returns the ActivityLifecycleMonitor.
`static void` | `registerInstance(ApplicationLifecycleMonitor monitor)` Stores a lifecycle monitor in the registry.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()`
`boolean` | `equals(Object arg0)`
`void` | `finalize()`
`final Class<?>` | `getClass()`
`int` | `hashCode()`
`final void` | `notify()`
`final void` | `notifyAll()`
`String` | `toString()`
`final void` | `wait(long arg0, int arg1)`
`final void` | `wait(long arg0)`
`final void` | `wait()`

## Public methods

### getInstance

    ApplicationLifecycleMonitor getInstance ()

Returns the ActivityLifecycleMonitor. This monitor is not guaranteed to be present under all instrumentations.

Returns
`ApplicationLifecycleMonitor` | ActivityLifecycleMonitor the monitor for this application.

Throws
`IllegalStateException` | if no monitor has been registered.

### registerInstance

    void registerInstance (ApplicationLifecycleMonitor monitor)

Stores a lifecycle monitor in the registry.

This is a global registry - so be aware of the impact of calling this method!

Parameters
`monitor` | `ApplicationLifecycleMonitor`: the monitor for this application. Null deregisters any existing monitor.

- ## Interfaces

  - ActivityLifecycleCallback
  - ActivityLifecycleMonitor
  - ApplicationLifecycleCallback
  - ApplicationLifecycleMonitor

- ## Classes

  - ActivityLifecycleMonitorRegistry
  - ApplicationLifecycleMonitorRegistry

- ## Enums

  - ApplicationStage
  - Stage