ActivityLifecycleCallback

interface ActivityLifecycleCallback


Callback for monitoring activity lifecycle events. These callbacks are invoked on the main thread, so any long operations or violating the strict mode policies should be avoided.

Summary

Public methods

abstract @NonNull void
onActivityLifecycleChanged(
    @NonNull Activity activity,
    @NonNull Stage stage
)

Called on the main thread after an activity has processed its lifecycle change event (for example onResume or onStart)

Public methods

onActivityLifecycleChanged

@NonNull
public abstract void onActivityLifecycleChanged(
    @NonNull Activity activity,
    @NonNull Stage stage
)

Called on the main thread after an activity has processed its lifecycle change event (for example onResume or onStart)

Parameters
@NonNull Activity activity

The activity

@NonNull Stage stage

its current stage.