addLifecycleListener


Purpose

Registers any of various lifecycle callbacks. It is used to establish the status of either the Pega Client for Windows or the web application.

Signature

addLifecycleListener( callback )

Returns

This method does not return anything.

Parameter

Name Description Type Use
callback An object passed to indicate the lifecycle of the Pega Client for Windows or the web application. object required

Callback structure

The LifecycleListener object's callback can be structured as follows:

{
  onHide: function() {...},
  onPause: function() {...},
  onResume: function() {...},
  onShow: function() {...}
}

Methods

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 Client for Windows goes to the background or the device screen is turned off. This callback is sent to all webviews. undefined
onResume Called when Pega Client for Windows 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

Related topics

Public API reference
Container
Legal notice | Copyright © 2017 and Confidential to Pegasystems Inc. All rights reserved
PDN | Pega Mobile Client | Feedback
Advanced...