
Registers any of various lifecycle callbacks. It is used to establish the status of either the Pega Mobile Client or the web application.
| Name | Description | Type | Use |
|---|---|---|---|
| callback | An object passed to indicate the lifecycle of the Pega Mobile Client or the web application. | object |
required |
The LifecycleListener object's callback can be structured as
follows:
{
onHide: function() {...},
onPause: function() {...},
onResume: function() {...},
onShow: function() {...}
}The following table lists all callbacks supported by the
LifecycleListener object.
| Name | Description | Return type |
|---|---|---|
| onHide | Called when the Web App is hidden. This callback is sent to the affected webview only. | undefined |
| onPause | Called when Pega Mobile Client goes to the background or the device screen is turned off. This callback is sent to all webviews. | undefined |
| onResume | Called when Pega Mobile Client goes to the foreground. This callback is sent to all webviews. | undefined |
| onShow | Called when the Web App is shown. This callback is sent to the affected webview only. | undefined |