addLifecycleListener


Purpose

Registers any of various lifecycle callbacks. It is used to establish the status of either the Pega Mobile Client 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 Mobile Client 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. undefined
onPause Called when Pega Mobile Client goes to the background or the device screen is turned off. undefined
onResume Called when Pega Mobile Client goes to the foreground. undefined
onShow Called when the Web App is shown. undefined

Related topics

Public API reference
Container
Legal notice | Copyright © 2015 and Confidential to Pegasystems Inc. All rights reserved. | Feedback
Advanced...