Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface ILifecycle

interface ILifecycle
Extends com.amazon.apmf.IStandard This interface represents a lifecycle that can be observed.

Methods

addObserver()

com.amazon.apmf.ISubscription* addObserver(ILifecycleObserver* observer)
Add an ILifecycleObserver to this ILifecycle. The observer can be used to listen to different lifecycle events.

Parameters

observer
ILifecycleObserver* — Required The ILifecycleObserver to add.

Returns

com.amazon.apmf.ISubscription* An ISubscription that can be used to remove the ILifecycleObserver. Although this always returns a valid ISubscription, the observer callbacks will not be executed if the ILifecycleOwner detaches from the window. It is always safe to call ISubscription::unsubscribe.

getState()

LifecycleState getState()
Get the current state of this ILifecycle.

Returns

LifecycleState The LifecycleState of this ILifecycle.
Last modified on October 29, 2026