Android Lifecycle Events

This section goes through how you can detect the standard Android Lifecycle Events triggered within an Android environment.

You can use this to identify when users minimise your application, when they return, when they close the application and more. Currently, the the events offered are listed in our EAndroidLifecycleEventType definition.

A clear visual representation of the flow of lifecycle events can be viewed on the Official Android Documentation.

Available Blueprint Nodes

Setup Lifecycle Event Callbacks

API-1+

This blueprint node sets up a delegate to be triggerd whenever an Android lifecycle event occurs.

You can filter on the events you are interested in with a common switch statement.

1

Run on Game Thread

Indicates whether or not to execute the delegate on the Game Thread.

Ultimately, if this is ticked, you can update UI elements directly off the delegate, however, the ON_STOP event will not be triggered immediatly when someone minimises your appliaction. If the ON_STOP event is something you are interested in, you should not tick this and handle UI updates through variable changes.

2

On Lifecycle Event

A delegate triggering everytime a lifecycle event occurs.

You can simply click and drag this pin to create a custom event.