public class

LifecycleUtils

extends Object
java.lang.Object
   ↳ com.pdftron.demo.utils.LifecycleUtils

Summary

Public Constructors
LifecycleUtils()
Public Methods
static void runOnResume(LifecycleOwner owner, LifecycleCallback callback)
Ensures the function will only run when lifecycle owner is in a resumed state (e.g.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public LifecycleUtils ()

Public Methods

public static void runOnResume (LifecycleOwner owner, LifecycleCallback callback)

Ensures the function will only run when lifecycle owner is in a resumed state (e.g. not backgrounded) Otherwise it creates a listener to execute once resumed

Parameters
owner Lifecycle Owner
callback Callback to execute on resume