public class LifecycleBridge extends BaseApplicationBridge implements ILifecycle, APIBridge
apiGroup| Constructor and Description |
|---|
LifecycleBridge(ILifecycle delegate)
Constructor with delegate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLifecycleListener(ILifecycleListener listener)
Add the listener for the lifecycle of the app
|
ILifecycle |
getDelegate()
Get the delegate implementation.
|
APIResponse |
invoke(APIRequest request)
Invokes the given method specified in the API request object.
|
boolean |
isBackground()
Whether the application is in background or not
|
void |
removeLifecycleListener(ILifecycleListener listener)
Un-registers an existing listener from receiving lifecycle events.
|
void |
removeLifecycleListeners()
Removes all existing listeners from receiving lifecycle events.
|
void |
setDelegate(ILifecycle delegate)
Set the delegate implementation.
|
getAPIGroup, getAPIVersion, getJSONParserclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAPIGroup, getAPIVersionpublic LifecycleBridge(ILifecycle delegate)
delegate - The delegate implementing platform specific functions.public final ILifecycle getDelegate()
public final void setDelegate(ILifecycle delegate)
delegate - The delegate implementing platform specific functions.public void addLifecycleListener(ILifecycleListener listener)
addLifecycleListener in interface ILifecyclelistener - Lifecycle listenerpublic boolean isBackground()
isBackground in interface ILifecyclepublic void removeLifecycleListener(ILifecycleListener listener)
removeLifecycleListener in interface ILifecyclelistener - Lifecycle listenerpublic void removeLifecycleListeners()
removeLifecycleListeners in interface ILifecyclepublic APIResponse invoke(APIRequest request)
invoke in interface APIBridgeinvoke in class BaseApplicationBridgerequest - APIRequest object containing method name and parameters.