Module com.gluonhq.attach.lifecycle
Class AndroidLifecycleService
java.lang.Object
com.gluonhq.attach.lifecycle.impl.AndroidLifecycleService
- All Implemented Interfaces:
LifecycleService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(LifecycleEvent eventType, Runnable eventHandler) Adds a life cycle event listener to the native platform, to be notified ofLifecycleEventevents.voidremoveListener(LifecycleEvent eventType, Runnable eventHandler) Removes a previously installed event handler.voidshutdown()Initiates the process of shutting down the application that called this method.
-
Constructor Details
-
AndroidLifecycleService
public AndroidLifecycleService()
-
-
Method Details
-
shutdown
public void shutdown()Description copied from interface:LifecycleServiceInitiates the process of shutting down the application that called this method. This removes the need to perform any platform-specific shutdown routines.- Specified by:
shutdownin interfaceLifecycleService
-
addListener
Description copied from interface:LifecycleServiceAdds a life cycle event listener to the native platform, to be notified ofLifecycleEventevents.- Specified by:
addListenerin interfaceLifecycleService- Parameters:
eventType- The type of event to listen for.eventHandler- The event handler that will be called when the event fires.
-
removeListener
Description copied from interface:LifecycleServiceRemoves a previously installed event handler. If no such event handler is found, this method is a no-op.- Specified by:
removeListenerin interfaceLifecycleService- Parameters:
eventType- The type of event that was being listened to.eventHandler- The event handler that should be removed.
-